shrivallabha
Excel Ninja
I think this is easier one but saw this as requirement on some other forum. The person had requested a VBA solution as probably he thought VBA was easier [only?] route.
Here is the data:
There are 8 columns and correlate to some items which have numeric value under each column. The last column with name "CC" is the result column which shows expected result for the particular set of data.
Assumptions:
There are no blanks and Text entries in the data field.
The numerical values are whole numbers.
Your formula may take these assumptions into account. Or you could work out some fantastic solution which works without these assumptions.
Challenge:
Your challenge is to find first non-zero occurrence and then give count for all columns ahead even if they have 0 or any other numeric value.
Note: the formula should work any where in the sheet.
I have not used named ranges but you can use them. I am interested in seeing your formula and thinking more than anything else. And try to work out array and non-array approaches. So far, I have figured out 2-3 approaches which work so I do have a solution with me.
Here is the data:
Code:
Heading Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 CC
H1 12 0 0 0 0 -5 1 0 8
H2 0 0 -7 12 13 15 16 4 6
H3 1 0 0 0 0 0 0 0 8
H4 0 1 0 1 0 1 0 1 7
There are 8 columns and correlate to some items which have numeric value under each column. The last column with name "CC" is the result column which shows expected result for the particular set of data.
Assumptions:
There are no blanks and Text entries in the data field.
The numerical values are whole numbers.
Your formula may take these assumptions into account. Or you could work out some fantastic solution which works without these assumptions.
Challenge:
Your challenge is to find first non-zero occurrence and then give count for all columns ahead even if they have 0 or any other numeric value.
Note: the formula should work any where in the sheet.
I have not used named ranges but you can use them. I am interested in seeing your formula and thinking more than anything else. And try to work out array and non-array approaches. So far, I have figured out 2-3 approaches which work so I do have a solution with me.