What formula would allow me to lookup the value given that it is the first instance that it is not blank?

31 views Asked by At

Basically, this is my table:

Jan-23 Feb-23 Mar-23 Apr-23
ABC 1
DEF 1
GHI 1 1

On another sheet I have those set codes listed vertically:

ABC, DEF, GHI

I would like to have a formula where it would provide me with the first date there is a value in:

ABC 2/2023
DEF 1/2023
GHI 4/2023

I have tried this formula =IFERROR(INDEX('Set Plan'!$P$3:$AY$3, XLOOKUP(1, ('Set Plan'!$P4:$AY282 > 0) * ('Set Plan'!$C$4:$C$282 = $J925), 'Set Plan'!$P$3:$AY$3, "", 0, 1)), "No Match Found") but no luck

1

There are 1 answers

0
Raky On

You may try this to get the desired result

=IFERROR(INDEX('Set Plan'!$P$3:$AY$3, XLOOKUP(1, ('Set Plan'!$P4:$AY282 > 0) * ('Set Plan'!$C$4:$C$282 = $J925), 'Set Plan'!$P$3:$AY$3, "", 0, 1), "No Match Found")

Please do look at the cell addresses that I am using in the formula and ensure the source and destination cell addresses are correct, when using the formula.