Incrementing a range within a forumula

Phosphonothioic

Board Regular
Joined
Sep 27, 2009
Messages
194
Here's the formula:

=SUMIF('Sheet1!$H$979:$H$1926,$B6,'Sheet1!R$979:R$1926)

I need the R's in the sum_range to increment by a given number of letters when I drag the formula across the sheet.

Let's say 2 letters for simplicity. So R would become T in the next cell.


Is this possible? Thanks!!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Try something like this...

Code:
=SUMIF(Sheet1!$H$979:$H$1926,$B6,[COLOR="Red"]OFFSET(Sheet1!$R$979:$R$1926,0,(COLUMN(A1)-1)*[COLOR="Blue"]2[/COLOR])[/COLOR])

The 2 is the number of columns you want to increment.
 
Last edited:
Upvote 0
Hi
Works fine for me by dragging across. I'm in Excel 07
Can't remember, but I thought the CTRL key did that.
 
Upvote 0
Try something like this...

Code:
=SUMIF(Sheet1!$H$979:$H$1926,$B6,[COLOR=red]OFFSET(Sheet1!$R$979:$R$1926,0,(COLUMN(A1)-1)*[COLOR=blue]2[/COLOR])[/COLOR])

The 2 is the number of columns you want to increment.

I'm not having any luck getting

OFFSET(Sheet1!$R$979:$R$1926,0,(COLUMN(A1)-1)*2)

to work with a range of cells. This line gives me #VALUE! when evaluated by itself...
 
Upvote 0
I'm not having any luck getting

OFFSET(Sheet1!$R$979:$R$1926,0,(COLUMN(A1)-1)*2)

to work with a range of cells. This line gives me #VALUE! when evaluated by itself...

It returns a range of cells. If you evaluate it by itself, it will evaluate to #VALUE! just as if you were to evaluate =Sheet1!$R$979:$R$1926 by itself.

I don't know what the problem is. It works in my tests. Did you modify the formula? If yes, can you show the exact formula you used?

The OFFSET function simply offsets by n columns from Sheet1!$R$979:$R$1926

The column incrimination is this part. (COLUMN(A1)-1)*2. If you put this in any cell...
=(COLUMN(A1)-1)*2
...and drag it right, you can see how the column offset increments (0, 2, 4, ...etc)
 
Upvote 0

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top