Hi All,
Struggling with an excel problem. I have one list (list 1) with IDs and a corresponding value (letter).
Separately, i have a list of IDs (list 2) that I want to put the latest value for (see output columns for what i mean). I want to check first if a 2 -C exists, if not, check if a 2-B exists, whichever is the latest, display that value for the '2' ID.
Here's how i tackled it in excel:
Note - I simplified the below example for readability, the real problem has more complicated IDs and the letter column has more characters.
List 1:
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 230"]
<tbody>[TR]
[TD="class: xl65, width: 230"]ID[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Letter [/TD]
[TD][TABLE="width: 230"]
<tbody>[TR]
[TD="class: xl65, width: 230"]concatenate (Column C)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]1, A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]B[/TD]
[TD]1, B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]C[/TD]
[TD]1, C[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]2, A[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]2, A[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]2, B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]2, B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]2, B[/TD]
[/TR]
</tbody>[/TABLE]
List 2:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID (column D)[/TD]
[TD]Output[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[/TR]
</tbody>[/TABLE]
Struggling with an excel problem. I have one list (list 1) with IDs and a corresponding value (letter).
Separately, i have a list of IDs (list 2) that I want to put the latest value for (see output columns for what i mean). I want to check first if a 2 -C exists, if not, check if a 2-B exists, whichever is the latest, display that value for the '2' ID.
Here's how i tackled it in excel:
- created a column for concatenated values for list 1
- Wrote nested if statement in output column of list 2
- nested if statement:
- =IF(MATCH(CONCATENATE(D1,", ","C"),C;C,0),"C",
- IF(MATCH(CONCATENATE(D1,", ","B"),C;C,0),"B",
IF(MATCH(CONCATENATE(D1,", ","A"),C:C,0),"A",0)))
Error: the formula returns a #N/A value
Note - I simplified the below example for readability, the real problem has more complicated IDs and the letter column has more characters.
List 1:
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 230"]
<tbody>[TR]
[TD="class: xl65, width: 230"]ID[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Letter [/TD]
[TD][TABLE="width: 230"]
<tbody>[TR]
[TD="class: xl65, width: 230"]concatenate (Column C)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]A[/TD]
[TD]1, A[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]B[/TD]
[TD]1, B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]C[/TD]
[TD]1, C[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]2, A[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]A[/TD]
[TD]2, A[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]2, B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]2, B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[TD]2, B[/TD]
[/TR]
</tbody>[/TABLE]
List 2:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID (column D)[/TD]
[TD]Output[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]B[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: