Dragging across formula

handofthrawn

New Member
Joined
Feb 13, 2014
Messages
9
Currently I have thousands of cells of data in columns A and B I need to calculate.

My C column looks like this.
C1 = (A2/$A$1) - (B2/$B$1)
C2 = (A3/$A$1) - (B3/$B$1)
C3 = (A4/$A$1) - (B4/$B$1)
...

I want to be able to drag C1 across D1, E1, etc get it to look like this
D1 = (A7/$A$6) - (B7/$B$6)
E1 = (A12/$A$11) - (B12/$B$11)
F1 = (A17/$A$16) - (B17/$B$16)
...

This allows me then to drag down the formulas of D1, E1, F1, and so on. Its skipping 5 rows, essentially a week of data, for each calculation. I've tried to search this problem but I can't solve it. Would I need to use VBA or could I use INDEX or Offset? I'm kind of at a loss and hoping someone could point me in a logical direction. Thanks for any help!
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try putting this in C1, then copy down and to the right as far as needed.

=OFFSET($A2,(COLUMNS($B$1:B1)-1)*5,0)/OFFSET($A$1,(COLUMNS($B$1:B1)-1)*5,0)-(OFFSET($B2,(COLUMNS($B$1:B$1)-1)*5,0)/OFFSET($B$1,(COLUMNS($B$1:B$1)-1)*5,0))
 
Upvote 0
It worked perfectly, thank you so very much!!! At first I was so confused, I clicked on the formula in excel and it highlights the A1, A2, B1, B2 cells and I didn't think it worked when I dragged it over. I checked it against my manual entries and it proved it was the same results. Thanks for helping me understand Offset and how to tackle this sort of situation! Have a wonderful week.
 
Upvote 0
I'm glad it works for you! And I'm glad you bothered to figure out how it works too. Have a good day.
 
Upvote 0

Forum statistics

Threads
1,223,953
Messages
6,175,598
Members
452,658
Latest member
GStorm

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