Change specific number of columns when copying

laptopbob

New Member
Joined
Sep 13, 2018
Messages
11
I have this formula:
X6=SUM($BC$2:$BC$5000)/SUM($BA$2:$BA$5000)

When I copy it to Y6 I would like it to read:
=SUM($BF$2:$BF$5000)/SUM($BH$2:$BH$5000)

So the culumn number should change 5 from BA to BF and BC to BH.

I have tried with indirect but can't get that to work. Any ideas?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Possibly:

=SUM(OFFSET($BC$2:$BC$5000,0,(COLUMNS($X6:X6)-1)*5))/SUM(OFFSET($BA$2:$BA$5000,0,(COLUMNS($X6:X6)-1)*5))

I think you reversed some of your references, but see if that works.
 
Upvote 0
Possibly:

=SUM(OFFSET($BC$2:$BC$5000,0,(COLUMNS($X6:X6)-1)*5))/SUM(OFFSET($BA$2:$BA$5000,0,(COLUMNS($X6:X6)-1)*5))

I think you reversed some of your references, but see if that works.

You are correct. I made a mistake. It had to be

When I copy it to Y6 I would like it to read:
=SUM($BH$2:$BH$5000)/SUM($BF$2:$BF$5000)

I will just test the formula. I should be able to keep copying it to further cells, right? E.g. Y6, Z6 etc?
 
Upvote 0
Correct, the column references will go up by 5 columns for every one column you copy the formula over.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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