Formula for detecting a sheet

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
I have this formula that I've got working IF the sheet "Arrival" already exists. However, would would I go about using this if Arrival doesn't exist? I know how I could create it with vba but trying to figure out how to do it with a formula.

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Do you mean that you want the formula to create the sheet? That is not possible, a formula can only give you an answer, it can not change something else.
 
Upvote 0
I have this formula that I've got working IF the sheet "Arrival" already exists. However, would would I go about using this if Arrival doesn't exist? I know how I could create it with vba but trying to figure out how to do it with a formula.

Thanks

What do you want to happen if the sheet exists?
What do you want to happen if the sheet doesn't exist?
 
Upvote 0
On "Sheet", if sheet "Arrival" Exists, I'd like Sheet!A1=Arrival!A1 and if "Arrival" doesn't exist, I'd like Sheet!A1=Sheet!A2
 
Upvote 0
Try like this:

Code:
=IF(ISREF(INDIRECT("Arrival"&"!A1")),"exists","not exists")
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

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