BenefitRich
New Member
I am trying to come up with a formula that will let me return an array of X cells beginning with the the 1st NON-ZERO value from a data table:
ItemA:0|1|2|8
ItemB:9|0|3|6
ItemC:4|2|0|5
So, given the Item and say 3 cells, the formula Would return something like this:
[pre]
Hopefully this makes enough sense for my question. I'm sorry, I've been at this for hours and am not making any progress.
If I know the row involved I can use something like OFFSET(FirstCell,,MATCH(TRUE,FirstCell:LastCell>0,0)-1,1,1) but that doesn't seem to work when the FirstCell and LastCell are effectively in different rows.
ItemA:0|1|2|8
ItemB:9|0|3|6
ItemC:4|2|0|5
So, given the Item and say 3 cells, the formula Would return something like this:
[pre]
Code:
ItemA:1|2|8
ItemB:9|0|3
ItemC:4|2|0[/pre]
I know how to do this if I know the row involved, but I am extracting from a large table where I won't know the right row to look across. I'm sure there is a combination of INDEX MATCH and OFFSET that will do this, but I don't know how :(
=INDEX(Table,MATCH(Item_Being_Looked_Up,List_Of_Items,0),???___MATCH(TRUE,______????>0???)
Hopefully this makes enough sense for my question. I'm sorry, I've been at this for hours and am not making any progress.
If I know the row involved I can use something like OFFSET(FirstCell,,MATCH(TRUE,FirstCell:LastCell>0,0)-1,1,1) but that doesn't seem to work when the FirstCell and LastCell are effectively in different rows.