Dragging and Sumif to change the sheet name

roc_ent

Board Regular
Joined
Jan 27, 2003
Messages
246
Office Version
  1. 2019
Platform
  1. Windows
I'm creating a page where the months are in cells A19 to A30. On ROW 18 I have different category headings like B18 is Advertising, C18 is Rent.
so what I'm doing is SUMIF in B19 and I've created the formula with relative cells to look in so my formula would be =SUMIF(Jan!$D$5:$D$94,"Advertising",Jan!$C$5:$C$94) but what I want to change when dragging is the Jan to Feb to Mar etc. All other information and references are working good. I'm doing a find and replace row by row. There must be a way to change the tab (or month) names.
 

Attachments

  • excel1.JPG
    excel1.JPG
    165.5 KB · Views: 5

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
68,086
Office Version
  1. 365
Platform
  1. Windows
You could use the INIRECT function, although it's slow & volatile.
+Fluff 1.xlsm
ABC
17
18AdvertisingInsurance
19Jan00
20Feb00
Master
Cell Formulas
RangeFormula
B19:C20B19=SUMIF(INDIRECT($A19&"!$D$5:$D$94"),B$18,INDIRECT($A19&"!$C$5:$C$94"))
 

roc_ent

Board Regular
Joined
Jan 27, 2003
Messages
246
Office Version
  1. 2019
Platform
  1. Windows
Sorry Fluff, but for some reason its not giving me what I need. The long way is using Find and replace, so I drag down say "Jan" into the Feb cell then use find and replace the Jan and replace with Feb.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
68,086
Office Version
  1. 365
Platform
  1. Windows
Do you have the sheet names in col A as shown in my post?
 

roc_ent

Board Regular
Joined
Jan 27, 2003
Messages
246
Office Version
  1. 2019
Platform
  1. Windows
no I do not. The tabs are Accounting, Jan, Feb, Mar to Dec and last sheet is the tables
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
68,086
Office Version
  1. 365
Platform
  1. Windows
When you said
I'm creating a page where the months are in cells A19 to A30.
I assumed that you had Jan, Feb, Mar etc in those cells. Can you change those value so that they match the sheet names?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,111
Messages
5,768,161
Members
425,458
Latest member
Jaspal1996

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
Top