View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Multiplying non consecutive rows, then adding it.

Try the amendment - it works okay for me.

Pete

On Jul 4, 8:52 pm, RF wrote:
Hi Pete,

Thanks for your answer. I just tried it and I keep getting "0". I am quite
sure the first IF for the even rows is always returning 0.

Regards,

RF



"Pete_UK" wrote:
As your formula steps through the array, you will always be looking at
the same row, so it can't be both odd and even. I think you will need
to do something like:


=SUMPRODUCT((IF(MOD(ROW(D2:D62),2)=1,D2:D62,0)*IF( MOD(ROW(B3:B63),
2)=0,B3:B-63,0)))


This should multiply D2 with B3, D4 with B5 etc.


Hope this helps.


Pete


On Jul 4, 8:28 pm, RF wrote:
Hello,


I need your help here. I am trying to calculate a monthly progress of
planned vs. real. My "planned" formula is ok. The problem comes for the
"real" one.


Let's say I wanted to multiply the odd rows from D2:D63 * even rows from
B2:B63, then add the results. I have tried things like
=SUMPRODUCT((IF(MOD(ROW(D2:D63),2)=1,D2:D63,0)*IF( MOD(ROW(B2:B63),2)=0,B2:B*-63,0))) but it won't work, it will always display 0 as a result.


Odd rows from B2:B63 will be blank, and in D2:D63 we will have the "real"
progress on odd rows and "planned" progress on even rows.


I know it shouldn't be so difficult, but I'm stuck.


Thanks in advance.


Regards,


RF- Hide quoted text -


- Show quoted text -