Formula for detecting a sheet

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
618
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
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
9,983
Office Version
2019
Platform
Windows
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.
 

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,342
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?
 

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
618
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
 

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,342
Does this work?

in Sheet1!A1
=IFERROR(Arrival!A1,Sheet!A2)
 

KOKOSEK

Board Regular
Joined
Apr 8, 2019
Messages
224
Office Version
365, 2013
Platform
Windows
Try like this:

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

Watch MrExcel Video

Forum statistics

Threads
1,102,345
Messages
5,486,323
Members
407,539
Latest member
ltwkuav

This Week's Hot Topics

Top