I have four separate columns:
A | B | C | D |
---|---|---|---|
123 | 123 | value1 | |
456 | 456 | value2 | |
789 |
I want to assign column D values to column B if column A and C match. For example, B:1 should be assigned 'value1', B:2 will be 'value2' and B:3 will be blank.
CodePudding user response:
Try this in cell B1:
=if(A1=C1,D1,"")
For future reference consider looking a little harder for a solution before posting. The formula bears a pretty close resemblance to your actual question... "if... a = c then..."
CodePudding user response:
Found my answer: =IFERROR(VLOOKUP(A1, $C$1:$D, 2, false))
CodePudding user response:
try:
=INDEX(IF((A1:A=C1:C)*(C1:C<>""), "value"&COUNTIFS(
COUNTIFS(A1:A, C1:C, ROW(A1:A), "<="&ROW(C1:C)),
COUNTIFS(A1:A, C1:C, ROW(A1:A), "<="&ROW(C1:C)),
ROW(A1:A), "<="&ROW(C1:C)), ))