Hi
Hoping someone might be able to help me with this one.
I have a formula to add every forth row in a range which is working fine (only a small range at the moment while testing). This is
Formula is =SUM(H11:H18*(MOD((ROW(H11:H18)-7),4)=0)) where my range is H11:H18 and this SUMS H11 and H15. This is working well but I am needing to make the range dynamic to deal with the data area expanding which is where I am running into problems.
H11 will stay the same but H18 will expand as rows are added in sets of four.
My plan was to do similar as I have done before and Name a Cell and then use the Row Function to get the row number.
I.e. I have named Cell A19 as "WorldWideEnd" and then Row(WorldWideEnd)-1 gives me 18.
If I then amend my formula to be
=SUM(INDIRECT("H11:H"&(ROW(WorldWideEnd)-1))*(MOD((ROW(INDIRECT("H11:H"&(ROW(WorldWideEnd)-1)))-7),4)=0))
It returns "#Value!"
I tried putting the Row(WorldWideEnd)-1 is a different cell and referencing this as below where H39 is where Row(WorldWideEnd)-1 is calculated
=SUM(INDIRECT("H11:H"&H39)*(MOD((ROW(INDIRECT("H11:H"&H39))-7),4)=0))
and this works but I cannot seem to get it to work as one formula.
Hoping someone can spot what mistake I am making as having spent a little while looking at it is is driving mad !
Thanks in advance
Mike
Bookmarks