Reputation: 85
I have two columns where first columns containing initial 5 consecutive zeros and then followed by non zeros numbers.
What i want to achieve here is whenever nonzeros number are starting in the first column (which is in our example starting from cell number A7 ) it should start multiply with the initial number of the second column. So in our example it should be (A7*B1) then (A8*B2) and so on and so forth..
Below is the screenshot for reference.
I tried with Below formula but its seems its doesn't server the purpose.
=IF(A2=0,0,A2*B2)
Would be really helpful if anyone can help me with this problem.
Upvotes: 0
Views: 404
Reputation: 11968
INDEX
and COUNTIF
function combination can help you:
=A2*INDEX($B$2:$B$10,COUNTIF($A$2:A2,">0"))
Upvotes: 1