The second row in the screen capture below (row 4 in my sheet) will sum up the values on each column and divide this sum by something. Those values can always change, and I'm trying to find a way to make a selection from the first non-zero value to the last non-zero value so I could use that range, to create a chart.
I am using elsewere =LOOKUP(2;1/(4:4<>0);4:4)
, which will return the last non-zero value of the row number 4, but I cannot use MATCH I guess because I might find other values equal to the last non-zero value, "earlier" in the range, and will not return the reference of that specific last non-zero cell.
I have tried =MATCH(0;4:4;1)
to try to find the first non-zero cell, but this will return the location of the last zero cell for some reason.
Any ideas? VBA is also an option.