Formula Dependant on "text" in sheet name.

pulsarman605

New Member
Joined
Feb 10, 2016
Messages
6
Try to explain this the best I can, and hope someone has an answer.

I have a "master" sheet. It has formula that refers to particular cells in another sheet.

I want to be able to have that formula use different cells depending on if it finds "text" in the sheet name.

IE... I copy the master sheet to QLD JAN. I would like it to use QLD data. Copy to NSW JAN I would like the formula to use NSW data etc.

Hope this makes sense and whether it is possible.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try this:
=IF(ISNUMBER(SEARCH("QLD",SUBSTITUTE(MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,100),"[","")))=TRUE,"QLD","NSW")

You would change the two bolded values to reflect what you would like to return. So change QLD to the QLD cell reference and NSW to the NSW cell reference.
Also change A1 to the cell reference you are looking at from the master sheet.

Sincerely,
Max
 
Last edited:
Upvote 0
Hope this makes sense and whether it is possible.
Not really :(

How would it know you want the totals from OLD Jan rather than NSW JAN? Or any other sheet, for that matter?
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

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