Hi,
I am trying to copy a SUMIF formula across columns and would like the "criteria" to increase by row, not column.
Here is my formula:
=SUMIF($A:$A,A2,$B:$B)
How can I get the A2 to become A3, A4, etc.
Thanks!
Hi,
I am trying to copy a SUMIF formula across columns and would like the "criteria" to increase by row, not column.
Here is my formula:
=SUMIF($A:$A,A2,$B:$B)
How can I get the A2 to become A3, A4, etc.
Thanks!
Hi Chizilla,
one possibility is using INDIRECT, but that would be volatile. So, you may want to try this in column C and copy across:
=SUMIF($A:$A,INDEX($A:$A,COLUMN()),$B:$B)
You may need to adjust the column() part by adding or subtracting a number that will result in the correct row number to feed into the Index() function.
Try out the Index() function in a separate cell in the same column that will have your original formula, then tweak the Column() with +2 or -1 or whatever, until you see the correct value of column A returned. Then plug that into your sumif() and copy across
hth
where's the first formula? Assuming it's in D3 then copied across try
=SUMIF($A:$A,INDEX($A:$A,COLUMNS($D3:D3)+1),$B:$B)
change the COLUMNS($D3:D3) part to reflect your actual start cell
Thanks to both of you - You've saved me a considerable amount of time!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks