Drag down formula referencing non-adjacent cells

EBoudreau

Board Regular
Joined
Aug 21, 2015
Messages
153
I have one tab in a spreadsheet summarizing information collected in other groups of cells in another tab in the same spreadsheet. I would like to be able to copy down the formula in one tab to reference non-adjacent cells in the other tab, but I cannot figure out how to make each consecutive line reference the right cells in the other spreadsheet because there are gabs in between.

I need to be able to continue dragging down from O12 with formula ='Time Entry'!T22 so that O13 will ='Time Entry'!T30. Essentially with every line I drag the formula down in column O, it references the 8th next cell down in the Time Entry tab. I started by manually having to adjust the formulas but that's going to take forever when I have 52 rows to do this in.

Did that make sense?

Timecard Template (Revising).xlsx
OPQRST
100.00$0.000.00$0.000.00$0.00
110.00$0.000.00$0.000.00$0.00
120.00$0.000.00$0.000.00$0.00
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Schedule - Summary
Cell Formulas
RangeFormula
O10:P10O10='Time Entry'!T6
Q10:R10Q10='Time Entry'!T7
S10:T12S10=SUM(O10,Q10)
O11:P11O11='Time Entry'!T14
Q11:R11Q11='Time Entry'!T15
O12:P12O12='Time Entry'!T22
Q12:R12Q12='Time Entry'!T23


Timecard Template (Revising).xlsx
STU
5WeeklyHoursPay
6Reg0.00$0.00
7OT0.00$0.00
8SUB TOT0.00$0.00
9Holiday0.00$0.00
10Total0.00$0.00
11P/Diem$0.00
12
13WeeklyHoursPay
14Reg0.00$0.00
15OT0.00$0.00
16SUB TOT0.00$0.00
17Holiday0.00$0.00
18Total0.00$0.00
19P/Diem$0.00
20
21WeeklyHoursPay
22Reg0.00$0.00
23OT0.00$0.00
24SUB TOT0.00$0.00
25Holiday0.00$0.00
26Total0.00$0.00
27P/Diem$0.00
28
29WeeklyHoursPay
30Reg0.00$0.00
31OT0.00$0.00
32SUB TOT0.00$0.00
33Holiday0.00$0.00
34Total0.00$0.00
35P/Diem$0.00
36
37WeeklyHoursPay
38Reg0.00$0.00
39OT0.00$0.00
40SUB TOT0.00$0.00
41Holiday0.00$0.00
42Total0.00$0.00
43P/Diem$0.00
44
45WeeklyHoursPay
46Reg0.00$0.00
47OT0.00$0.00
48SUB TOT0.00$0.00
49Holiday0.00$0.00
50Total0.00$0.00
51P/Diem$0.00
52
53WeeklyHoursPay
54Reg0.00$0.00
55OT0.00$0.00
56SUB TOT0.00$0.00
57Holiday0.00$0.00
58Total0.00$0.00
59P/Diem$0.00
60
61WeeklyHoursPay
62Reg0.00$0.00
63OT0.00$0.00
64SUB TOT0.00$0.00
65Holiday0.00$0.00
66Total0.00$0.00
67P/Diem$0.00
Time Entry
Cell Formulas
RangeFormula
T6,T62,T54,T46,T38,T30,T22,T14T6=IF(T8>40,"40.00",T8)
T7,T63,T55,T47,T39,T31,T23,T15T7=IF(T8<41,"0.00",(T8-T6))
T8,T64,T56,T48,T40,T32,T24,T16T8=SUM(H5:J11)
T9,T65,T57,T49,T41,T33,T25,T17T9=SUM(K5:K11)
U64,T66:U66,U56,T58:U58,U48,T50:U50,U40,T42:U42,U32,T34:U34,U24,T26:U26,U16,T18:U18,T10:U10,U8T10=SUM(T8:T9)
U6,U62,U54,U46,U38,U30,U22,U14U6=T6*P5
U7,U63,U55,U47,U39,U31,U23,U15U7=T7*Q5
U9,U65,U57,U49,U41,U33,U25,U17U9=T9*P5
U11,U67,U59,U51,U43,U35,U27,U19U11=SUM(L5:L11)
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
How about in O10 dragged down
Excel Formula:
=INDEX('Time Entry'!T:T,ROWS(O$10:O10)*8-2)
 
Upvote 0
Solution
How about in O10 dragged down
Excel Formula:
=INDEX('Time Entry'!T:T,ROWS(O$10:O10)*8-2)
Yea I added a chart here showing which cells in the 'Schedule-Summary' tab need to reference which cells in the 'Time Entry' tab.
Is there a way to do it with a formula because sometimes this spreadsheet is utilized in Google Sheets which removes code from the sheet from what I noticed. Or is that not doable in formula due to the referenced cells being non-adjacent?
I will need to be able to this with several different columns referencing difference groups of cells in the other sheet at well.


Timecard Template (Revising).xlsx
ABC
1Cell:needs to ref:
2O10T6
3O11T14
4O12T22
5O13T30
6O14T38
7O15T46
8O16T54
9O17T62
10O18T70
11O19T78
12O20T86
13O21T94
14O22T102
15O23T110
16O24T118
17O25T126
18O26T134
19O27T142
20O28T150
21O29T158
22O30T166
23O31T174
24O32T182
25O33T190
26O34T198
27O35T206
28O36T214
29O37T222
30O38T230
31O39T238
32O40T246
33O41T254
34O42T262
35O43T270
36O44T278
37O45T286
38O46T294
39O47T302
40O48T310
41O49T318
42O50T326
43O51T334
44O52T342
45O53T350
46O54T358
47O55T366
48O56T374
49O57T382
50O58T390
51O59T398
52O60T406
53O61T414
Sheet1
 
Upvote 0
This worked as expected! Thank you for the assistance!
Now the question I have is how do I transpose that formula to do the same thing in column U? But reference the cells directly below the ones being referenced in T? I tried copy pasting into my next column and just changing the referencing column to U and, adjusted the *8-2 to *9-2. It's not grabbing the right cells. Maybe I transposed that incorrectly?
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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