I went through some posts but couldn't find much help.
I have a data set like this
Column A Column B Column C
ABC ZZZ 123
BBB ABC 234
ZZZ BBB 567
I need to write a formula in Column D that if ABC is available in Column B, get me Column C value.
I tried all VLOOKUP functions but couldn't find one appropriately. Can someone please help on the same?
Have you tried this with VLOOKUP in D1
=VLOOKUP(A1,$B$1:$C$3,2,0)
After writing this in D1, drag this to the end
Column A Column B Column C Column D
ABC ZZZ 123 =VLOOKUP(L2,$M$2:$N$4,2,0)
BBB ABC 234 567
ZZZ BBB 567 123
Related
I am working with a dynamic data range, so whenever new columns or rows are added either as the last column / row OR anywhere within the data range it would update the records.
I created an OFFSET function for a dynamic data range:
=OFFSET(Data!$A:$A,0,0,COUNTA(Data!$B:$B),COUNTA(Data!$1:$1))
But the issue is that it is updating new columns inside the existing columns.
I honestly have tried several other ways but without success.
Example table:
Column A Column B Column C
Need to Add Column D between Column A and Column B
Desired Output:
Column A Column D Column B Column C
123 456 789 10 11
But I am getting:
Column A Column B Column C
123 789 10 11
456 789 10 11
456 789
456 456
123
123
Column D column has not been added but has just been updated in the cells within the Column A and B
Which is not what I am looking for
I have data in excel like this
A B C
p1 ABC 2
p2wt ABC 3
p3 EFG 1
p3wtke EFG 1
p9r EFG 2
I'm trying to sum up C column if B column has same data and concatenate A column data. And data looks like
A B C
p1-p2wt ABC 5
p3-p3wtke-p9r EFG 4
I tried using =SUMIFS(C1:C5,A1:A9,B1) but it is giving #value, and how do i concate A? I tried Excel concatenate, but is A2>A1 in this link is for number fields?
Use a helper column.
In D1 put:
=IF(B1<>B2,A1,A1&"-"&D2)
Then copy/drag down the data set.
The in another column create a list of the unique values in column B. I put mine in G.
Then in F1 I put:
=VLOOKUP(G1,B:D,3,FALSE)
And in H1 I put:
=SUMIF(B:B,G1,C:C)
Then copies/dragged down.
I want to check if a value or text string in a given row in Table 1 is also present in a given column in Table 2. Of course I could do this column by column in Table 1 but with about 50 columns I don't really want to. My data looks something like this:
Table 1
1 aaa bbb ccc
2 ddd eee fff
3 ggg hhh iii
Table 2
1 bbb
2 xxx
3 ccc
You could use an array formula:
=SUM(IF(COUNTIF(Sheet2!$A$1:$A$3,$A1:$C1)>0,1,0))
Press CTRL-SHIFT-ENTER after entering it as opposed to ENTER
This will tell you how many exist in the list on sheet2 for each row in sheet 1
I need to create a formula that adds up column A if the values in column B match.
A B
1 123
1 123
2 345
2 345
1 345
So for this example I need it to add up 123's to show 2 and 345's to show 5. I have been playing with SUMIF and VLOOKUP but haven't been able to get it to work.
In row2 and copied down to suit:
=SUMIF(B:B,B2,A:A)
I have 2 sheets with different values. I need to find a value from one cell.sheet1 in sheet2 and copy value from nextcell_in_the_same_row.sheet1 to nextcell_in_the_same_row.sheet2.
It is very difficult to explain let look at the example bellow.
E.g.
Before
first sheet:
A B
1 aaa 123
2 bbb 456
3 ccc 789
4 ddd 122
second sheet:
A B
1 aaa
2 ada
3 cca
4 ccc
After
first sheet:
A B
1 aaa 123
2 bbb 456
3 ccc 789
4 ddd 122
second sheet:
A B
1 aaa *need to find value in the first sheet and copy value from B2 because aaa in A1*
2 ada *value does not exist in the first sheet so copy nothing*
3 cca *not need to copy because no value in the first sheet*
4 ccc *need to copy the value from B3*
Thank you so much!
Use a VLOOKUP along with an IFERROR.
=IFERROR(VLOOKUP(A1, Sheet1!A:B, 2, 0), "")
This will do what you described (well described, by the way!) in your question. Drag the formula down in Sheet2 till the bottom.
VLOOKUP takes the value of A1 in sheet 2 (no sheet reference because the value is in the same sheet as the formula) and looks it up in column A of Sheet1.
It returns the second value (hence why 2) of the table selected in the formula (column A is 1, column B is 2).
The 0 tells the VLOOKUP to look for exact matches. You don't need approximate match here.
And IFFERROR is there in case VLOOKUP doesn't find anything (like with ada) and instead of giving #N/A, returns an empty cell, "".