Hi everyone,
I am looking for a formula that can lookup a value from a data table, then loop through multiple columns and return a column that has non-blank value.
Please see attached for more information.
Many thanks!
Hi everyone,
I am looking for a formula that can lookup a value from a data table, then loop through multiple columns and return a column that has non-blank value.
Please see attached for more information.
Many thanks!
L6 =IF(M6=0,"maintenance",INDEX($D$4:$H$4,MATCH(M6,OFFSET($D$5,MATCH(K6,$C$6:$C$19,0),0,1,5),0)))
m6 =SUMPRODUCT(($C$6:$C$19=K6)*($D$6:$H$19))
if your data is an accurate representation of reality, eg never 2 numbers on the same row
Worked like Magic. Thank you so much davsth
I have realised that its possible to have more than 2 numbers on two rows. Is it possible to get the results as attached?
I don't see any difference between the data in the two files.
Based on the narrative in post #4 it seems that there should there be rows of data in the file attached to that post that have two numbers?
Let us know if you have any questions.
Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.
I agree with the above, no desired answer and no data showing data on 2 lines. Please attach a representative file
Yes, The only difference is that the data has rows with two number, so I need help in how I can address that. The first answer I got assumed that there will be only one value per row, which I later realised it is not the case. I have highlighted the cells in red where cells have more than one number. We can assume that row can have up-to (maximum) two numbers.
If the values can be split into additional columns and there can never be 3 values
l6 =IFERROR(INDEX($D$4:$H$4,MATCH(TRUE,INDEX(($D6:$H6>0),0),0)),"Maintenance")
m6 =IFERROR(INDEX(D6:H6,MATCH(TRUE,INDEX(($D6:$H6>0),0),0)),0)
n6 =IF(COUNTIF(D6:H6,">0")>1, LOOKUP(2,1/($D6:$H6>0),$D$4:$H$4),"")
o6 =IF(COUNTIF(D6:H6,">0")>1, LOOKUP(2,1/($D6:$H6>0),D6:H6),"")
Thank you so much davsth. These formulas work perfectly.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks