Dragging formula across multiple cells, but value only changing 1 at a time

Babynod

Board Regular
Joined
Aug 10, 2022
Messages
56
Office Version
  1. 365
Platform
  1. Windows
i have 5 columns for each day set up for my daily reporting. theres formulas in a few of the columns, i know if i drag a cell with a formula without locking it the value changes by 1. but when i try and drag 5 at once it changes the value by 5 places.

E.G in Cell ACR:9 it says 10-lines picked. this is pulling from another spreadsheet from IL:20
1677552360123.png


now when I highlight all 5 columns to drag them across, my ACW:9 cell I want to pull from IM20, but instead it goes to IQ20 because that's 5 columns across.
1677552236779.png



i need to copy this for everyday until the end of the financial year, and redoing it each time is out of the question
 
Thanks for the clarifications.

Excel Formula:
=SUM(INDEX('[1. Operations Dashboard.xlsx]AM Shift'!$IL111:$XFD119,0,(COLUMNS($ACR:ACR)+4)/5))
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi Peter, if your still around.
im having trouble with reducing the amount of columns im moving down to just every 2nd column
this is what ive tried - =SUM(INDEX(DRC!$NA11:$NE11,0,(COLUMN($DQ:DQ)+1)/2))

1688622540497.png



but it gives me the #REF! error. im trying to move it from DQ to DS. the cell im trying to move has =SUM(DRC!$NA11:$NE11) which shows around 13k value

i only want to move in groups of 2 this time. DQ/DR would move to DS/DT
 
Upvote 0
I can't see what your formula is referring to or know what result(s) to expect. Can you give a small set of sample data from each worksheet and the expected results with XL2BB?
 
Upvote 0
havnt used XL2BB before but hopefully this works

Dragging formula accross 2 cells example data.xlsx
DPDQDRDSDTDUDVDWDXDYDZEAEBECEDEEEFEGEHEIEJEKELEMENEOEPEQERESET
1Jun-23 Week 3Jun-23 Week 4Jun-23 Week 5Jul-23 Week 1Jul-23 Week 2Jul-23 Week 3Jul-23 Week 4Jul-23 Week 5Aug-23 Week 1Aug-23 Week 2Aug-23 Week 3Aug-23 Week 4
2
3
4STATS %STATS %STATS %STATS %STATS %STATS %STATS %STATS %STATS %STATS %STATS %STATS %
5
6
7
8
9Expected Results97978.0119471.021.94%122774.02.76%13639.0-88.89%
10     
11Lines Picked97978.0 119471.021.94%
12
13
14
15
16
17
18the STATS is the sum of the lines picked for the week.
19the % is the difference between weeks
20I have to extend this all the way to the end of the next FY (July 24)
21
22
23
24
25
26
27
28
29
30DATA
31
32
33
3410/06/202311/06/202312/06/202313/06/202314/06/202315/06/202316/06/202317/06/202318/06/202319/06/202320/06/202321/06/202322/06/202323/06/202324/06/202325/06/202326/06/202327/06/202328/06/202329/06/202330/06/20231/07/20232/07/20233/07/20234/07/20235/07/20236/07/20237/07/20238/07/20239/07/2023
35SaturdaySundayMondayTuesdayWednesdayThursdayFridaySaturdaySundayMondayTuesdayWednesdayThursdayFridaySaturdaySundayMondayTuesdayWednesdayThursdayFridaySaturdaySundayMondayTuesdayWednesdayThursdayFridaySaturdaySunday
36JUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJUNJULJULJULJULJULJULJULJULJUL
37
38
39
40
41
42
43Lines Picked24178291182282921853230652937729109201841773624083271032879819883229071843472548652206
44
DRC Weekly Analysis
Cell Formulas
RangeFormula
DQ10DQ10=IF(SUM('https://axle.sharepoint.com/sites/GroupDCWarehouseOperations/Shared Documents/General/01. DCV/[001. Operations Dashboard.xlsx]DRC'!MQ10:MU10)=0,"",SUM('https://axle.sharepoint.com/sites/GroupDCWarehouseOperations/Shared Documents/General/01. DCV/[001. Operations Dashboard.xlsx]DRC'!MQ10:MU10))
DR10:DR11,DT10:DT11,DV10DR10=IFERROR((DQ10-DO10)/DO10,"")
DS10DS10=IF(SUM('https://axle.sharepoint.com/sites/GroupDCWarehouseOperations/Shared Documents/General/01. DCV/[001. Operations Dashboard.xlsx]DRC'!MX10:NB10)=0,"",SUM('https://axle.sharepoint.com/sites/GroupDCWarehouseOperations/Shared Documents/General/01. DCV/[001. Operations Dashboard.xlsx]DRC'!MX10:NB10))
DQ11DQ11=SUM(DS43:DW43)
DS11DS11=SUM(DZ43:ED43)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
ES37:ET43Expression=LEFT(ES$3,1)="S"textNO
EL37:EM43Expression=LEFT(EL$3,1)="S"textNO
DQ37:EK43Expression=LEFT(DQ$3,1)="S"textNO
DX11Cell Valuebeginning with ""textNO
DX11Celldoes not contain a blank value textNO
DR1:DR3,DT1:DT3,DV1:DV3,DR5:DR12,DT5:DT12,DX5:DX10,DX1:DX3,DX12,DV5:DV12,DZ1:DZ3,EB1:EB3,ED1:ED3,EF1:EF3,EH1:EH3,EJ1:EJ3,EL1:EL3,EN1:EN3Cell Valuebeginning with ""textNO
DR1:DR3,DT1:DT3,DV1:DV3,DR5:DR12,DT5:DT12,DX5:DX10,DX1:DX3,DX12,DV5:DV12,DZ1:DZ3,EB1:EB3,ED1:ED3,EF1:EF3,EH1:EH3,EJ1:EJ3,EL1:EL3,EN1:EN3Celldoes not contain a blank value textNO
 
Upvote 0
Bit hard to follow locations, but try this in DQ. Again I'm not sure where your data ends so I just guessed at ZZ being far enough across.
Excel Formula:
=SUM(INDEX(DRC!$NA11:$ZZ11,(COLUMNS($DQ:DQ)+1)/2*7-6):INDEX(DRC!$NA11:$ZZ11,(COLUMNS($DQ:DQ)+1)/2*7-2))

Your DR formula should be fine.
 
Upvote 0
Solution
Bit hard to follow locations, but try this in DQ. Again I'm not sure where your data ends so I just guessed at ZZ being far enough across.
Excel Formula:
=SUM(INDEX(DRC!$NA11:$ZZ11,(COLUMNS($DQ:DQ)+1)/2*7-6):INDEX(DRC!$NA11:$ZZ11,(COLUMNS($DQ:DQ)+1)/2*7-2))

Your DR formula should be fine.
spot on again mate. can you explain the COLUMNS part, why you went /2*7-6 and /2*7-2 for the two different parts of the sum.
as if i can nail this i have a few other spreadsheets id like to have a crack on but they are different numbers of columns etc
 
Upvote 0
can you explain the COLUMNS part, why you went /2*7-6 and /2*7-2
Each section that you want to add starts 7 columns after the last one so it has something to do with 7.
In the first formula column, DQ
(COLUMNS($DQ:DQ)+1)/2*7-6
(1+1)/2*7-6
2/2*7-6
=1
so the sum starts at cell 1 starting at col NA

(COLUMNS($DQ:DQ)+1)/2*7-2
(1+1)/2*7-2
2/2*7-2
=5
so the sum ends at cell 5 starting at col NA
The sum then is NA:NE as per your formula near the bottom of post #14

When the formula is in col DS
(COLUMNS($DQ:DS)+1)/2*7-6
(3+1)/2*7-6
=8
8th column starting at NA is NH

(COLUMNS($DQ:DS)+1)/2*7-2
(3+1)/2*7-2
=12
12th col starting at NA is NL
So that formula sums NH:NL
etc
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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