Referencing values in rows, base on column - excel

i need a formula to reference 3 different rows, depending on which column i paste into.
What i know is
the width is constant, 34 columns across
i want to paste into columns A1, L1, W1
I want to retrieve the values for cells, AK1,AK2,AK3
im using this at the moment to grab parts of the text in that cell. eg
="<tag" &MID($AK3,FIND(" ",$AK3),FIND(" ",$AK3,FIND("1",$AK3))-FIND(" ",$AK3))&" endtext>"
my idea was when i paste into column 22 i need something to return the number 2, pass that to an offset formula on AK1, as this is 2 thirds the way across, then i can reference 2 rows down from AK1 and get the value.
Hope that makes sense.
Here is an example. Cells A1 C1 E1 are retrieved from the H column

Presume you have named the three values sitting in Column AK as Rng_AK,
when you paste this formula =INDEX(Rng_AK,ROUNDUP(COLUMN()/34*ROWS(Rng_AK),0))
anywhere between Column A to K, you will get the first value in the given range;
anywhere between Column L to V, you will get the second value in the given range;
anywhere between Column W to AH, you will get the third value in the given range;
I am using your logic of locating the value in Column AK by the relative position of the column in the 34-Columns range.
See below screen-shot for more clarifications. Cheers :)

Related

Excel array formula to copy value based on matching criteria within group

I have the above data populated until column D (i.e. Top Priority column). I am looking for a formula to copy values in column E (top priority acc no. in column E is the desired result shown in the image).
i.e. Match Top Priority(D) to Priority(C) column , where the match is true copy the corresponding-same row for column account number value in the column E. This has to be applied in the groupings of all the Location values, in column A.
I think it would be some sought of index match array function but I'm not able to build the formula if someone can helps please. Thanks
Array (Control + Shift + Enter) Formula in E2 and copy down
=INDEX($B$2:$B$10,MATCH(D2,(IF($A$2:$A$10=A2,$C$2:$C$10)),0),1)
Formula is fine even if the data in not sorted on Location. Make sure top priority is same on all rows for a given location. Say, if you change D7 to 4, then E7 will be 800 as the formula will look for the 4th priority for the A2 location.

excel: Find value in column where cells contain multiple values separated by commas and return value from an adjacent column

I have two tables of data, call them table 1 and 2. In table 1 there is a long list of reference numbers. Each reference number has its own cell.
In table 2 I have the exact same reference numbers; however, in table 2 these reference numbers may or may not share that cell with another reference number. See below. The bottom three reference numbers in table 1 all share the same cell and are separated by a comma always.
Imagine table 1 and 2 are on separate tabs of the same workbook.
table 1 and 2
On the work sheet for table 1, I am trying to bring back the month found adjacent to the reference number in table 2. I am trying to take the value in table 1, search it in table 2, and return the month so that I get this result:
result in column b of table 1
I would like to avoid delimiting the values in the shared cells of table 2.
Thanks in advance for your help!
If your reference number are unique, you can get by with doing a wildcard vlookup
Assume you have a range in columns F and G where your reference numbers and months are. In Range A:B you want the values.
Essentially you are looking up like this.
If my value A1 is in column F and it matches a substring get the value from G
So you would use this formula in B1
=VLOOKUP(CONCATENATE("*", A1, "*"),$F$1:$G$6,2, FALSE)
what this is doing is, get the value from A1, and match the range of F:G where the first column CONTAINS A1, get the value from the corresponding G column
From there copy paste the formula for the rest of the
cells in B column

Excel get cells value if cells contain specific text

I have Table 1 & 2 like image.
How i can get all cells value if ID is equals?
If you just need to add numbers, there are formulas for this, but I'm not sure if there's a single formula for adding string values as in the provided example. One way to resolve this is by using accumulator columns as in this screen shot:
The formula in cell C3 is:
=IF($A3<>C$1,C2,IF(C2=0,$B3,C2&", "&$B3))
Copy this down to cell E10 (or wherever that table needs to end) and columns C to E will accumulate the values from column B. Table 2 then just maps the first and last rows of the accumulator columns. The zeros in cells C2 to E2 is a work-around to prevent Excel from converting blank cells into zeros.
Hope this helps!

Excel: Search for text-string in a row, return value of adjacent column cell (columns will differ frequently)

I have tried to use VLOOKUP, HLOOKUP, LOOKUP, INDEX and MATCH but haven't so far been able to solve the problem. I want to fill column A with the value adjacent to the value left of STRING that might be found in each row. The column of interest frequently differs.
E.g.
Return value of F1 if G1=STRING, F2 if G2=STRING, E3 if F3=STRING, D4 if E4=STRING
Picture
I managed to solve it by:
=IFERROR(INDEX($S2:$BJ2, MATCH("STRING", $S2:$BJ2,0)-1),"")
Now, if I want to extract the 2nd, 3rd and 4th value (if it happens to be more than one match) adjecent to "STRING" which changes have to be made?
I'm going to assume your data is in E1 to H100 - adjust as you need.
First we need the row -
SUMPRODUCT((E1:H100=A1)*ROW(E1:H100))
Then we use the same trick to get the column
SUMPRODUCT((E1:H100=A1)*COLUMN(E1:H100))
This gives us the row and column of the text
Now we use this to find the text in the next column
As the row and column are offset from cell 0,0 and A1 is 1,1 we need to subtract 1 from the row, and then 2 from the column to make it 1 cell to the left
This leaves us with the following formula:
=OFFSET(A1,SUMPRODUCT((E1:H100=A1)*ROW(E1:H100))-1,SUMPRODUCT((E1:H100=A1)*COLUMN(E1:H100))-2)
don't forget to anchor points if you go dragging the formula to fill multiple cells

Transposing values from one table to another, depending on column values

I'm looking for a vlookup or macro (or anything really) that will allow me to achieve the following in Excel.
I have a table with columns A through E. Column A is a "Query" (just a phrase that people are using to search for a client's website in Google). Columns B through E provide data on impressions, click thru rate etc.
I also have a table, starting with column, G ("Word/Phrase"), sitting in the same sheet. Column F is blank. Columns H through K have the same headings as columns B through E on the first table.
What I want to do is scan column A ("Query") and if one of the results in column A EXACTLY matches a result in column G ("Word/Phrase") then pull the data from the respective cells in columns B to E and paste it into columns H to K.
So for example:
Cell A5 has the value "rural sheds"
Cell B5 has the value "1000"
Cell C5 has the value "50"
Cell D5 has the value "5%"
Cell E5 has the value "1.7"
And in G17 the value is "rural sheds" ... now it's just a case of getting that other data transposed across.
I've Googled for an hour or so but can't seem to find anything that works. Obviously I can do it all by hand using CTRL + F, but I'll be doing lots of these reports and would love to save time.
I'm using Excel for Mac 2011, if that means anything.
Cheers,
Sam
Use this one in H1 and drag it down and accross:
=INDEX(B:B,MATCH($G1,$A:$A,0))
If exact match not found, formula above returns #N/A, but you can use next one to handle error:
=IFERROR(INDEX(B:B,MATCH($G1,$A:$A,0)),"not found")

Resources