Change Sheet and cell reference when dragging down formula

Tord1172

New Member
Joined
Dec 30, 2019
Messages
15
Office Version
  1. 2013
Platform
  1. Windows
Helloo.
I need help with this situation in which I have a summary sheet along with number of worksheets. The sheets are named as DEC1, DEC2 etc.... Every sheet has details of items sold and its sales value for the day. In the summary sheet I want to have details of total sales by each day. I tried using the INDIRECT function. But, the problem is, in every daily sheet, the total sales value is in different cell. For example in DEC1, the sales value is in C55, in DEC2 its C15, in DEC3 its C60. etc... Since the list of items sold very day is different, the total is coming to different cells like that. Is there anyway possible I can use a formula and drag down to get the total sales of each day in the summary sheet? Any help would be appreciated.

Thanks
 

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
Hi!

Any solution will need a method to identify the summary cell in each worksheet.

- Is it always in column C?
- Is it always in the last row?
- Perhaps there is some fixed text in coumn A of the row with summary?
- etc.

Best,

J.Ty.
 
Upvote 0
Hi!

Any solution will need a method to identify the summary cell in each worksheet.

- Is it always in column C?
- Is it always in the last row?
- Perhaps there is some fixed text in coumn A of the row with summary?
- etc.

Best,

J.Ty.

Thanks for the reply.. The total is always in column C. And all the totals are in last row. But the row number (row in in which totals are in) will be different in each worksheet depending on the number of items sold. The fixed text in the column A of the row with summary is "Total".
 
Upvote 0
The solution is as follows. I made it using "Sheet" as the generic name of a worksheet, you can change it to whatever suits you. Columns A, B and C give the solution step-bystep ,but you can use the formula form column D, which does everything directly.

Please let me know if it solves your problem,

J.Ty.

Book1
ABCD
1Sheet nameRow of totalTotal valueTotal value directly
2Sheet1101212
3Sheet2141717
4Sheet3455
Master
Cell Formulas
RangeFormula
A2:A4A2="Sheet"&ROW()-1
B2:B4B2=MATCH("Total",INDIRECT(A2&"!A:A"),0)
C2:C4C2=INDEX(INDIRECT(A2&"!C:C"),B2)
D2:D4D2=INDEX(INDIRECT("Sheet"&ROW()-1&"!C:C"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
 
Upvote 0
The solution is as follows. I made it using "Sheet" as the generic name of a worksheet, you can change it to whatever suits you. Columns A, B and C give the solution step-bystep ,but you can use the formula form column D, which does everything directly.

Please let me know if it solves your problem,

J.Ty.

Book1
ABCD
1Sheet nameRow of totalTotal valueTotal value directly
2Sheet1101212
3Sheet2141717
4Sheet3455
Master
Cell Formulas
RangeFormula
A2:A4A2="Sheet"&ROW()-1
B2:B4B2=MATCH("Total",INDIRECT(A2&"!A:A"),0)
C2:C4C2=INDEX(INDIRECT(A2&"!C:C"),B2)
D2:D4D2=INDEX(INDIRECT("Sheet"&ROW()-1&"!C:C"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
Sir, Its not quite what I wanted. Here is some screen shots of what I wanted. In the summary sheet, total from other sheets need to appear automatically when dragging.
 

Attachments

  • Sheet 1.jpg
    Sheet 1.jpg
    87.1 KB · Views: 17
  • Sheet 2.jpg
    Sheet 2.jpg
    79.1 KB · Views: 18
  • Summary sheet.jpg
    Summary sheet.jpg
    92.8 KB · Views: 19
Upvote 0
The totals do appear when dragging, but I made a screenshot of an allready filled spreadhseet.
I believe that it behaves the way you wanted. Just to make sure, please test it here.

J.Ty.
 
Upvote 0
The totals do appear when dragging, but I made a screenshot of an allready filled spreadhseet.
I believe that it behaves the way you wanted. Just to make sure, please test it here.

J.Ty.
How to bring the totals of all three columns (Gross, Tax, and Total) to summary sheet?
 
Upvote 0
Here you are. The file in Excel online has been updated, too.

Book1
ABCDEF
1Sheet nameRow of totalTotal valueThree total values directly
2Sheet11017171615
Master
Cell Formulas
RangeFormula
A2A2="Sheet"&ROW()-1
B2B2=MATCH("Total",INDIRECT(A2&"!A:A"),0)
C2C2=INDEX(INDIRECT(A2&"!C:C"),B2)
D2D2=INDEX(INDIRECT("Sheet"&ROW()-1&"!C:C"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
E2E2=INDEX(INDIRECT("Sheet"&ROW()-1&"!D:D"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
F2F2=INDEX(INDIRECT("Sheet"&ROW()-1&"!E:E"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
 
Upvote 0
Here you are. The file in Excel online has been updated, too.

Book1
ABCDEF
1Sheet nameRow of totalTotal valueThree total values directly
2Sheet11017171615
Master
Cell Formulas
RangeFormula
A2A2="Sheet"&ROW()-1
B2B2=MATCH("Total",INDIRECT(A2&"!A:A"),0)
C2C2=INDEX(INDIRECT(A2&"!C:C"),B2)
D2D2=INDEX(INDIRECT("Sheet"&ROW()-1&"!C:C"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
E2E2=INDEX(INDIRECT("Sheet"&ROW()-1&"!D:D"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
F2F2=INDEX(INDIRECT("Sheet"&ROW()-1&"!E:E"),MATCH("Total",INDIRECT("Sheet"&ROW()-1&"!A:A"),0))
Thank you :)
 
Upvote 0
Thanks for the feedback and good luck!

J.Ty.
 
Upvote 0

Forum statistics

Threads
1,215,129
Messages
6,123,216
Members
449,091
Latest member
jeremy_bp001

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