Link cell to to sheet not yet created..

tlc53

Active Member
Joined
Jul 26, 2018
Messages
399
Hi,

At the top of my spreadsheet I am going to have the Clients name.

The client name information is taken from a sheet in the workbook which hasn't yet been created.

For example, in Sheet1 Cell D6 will have the following formula: "=ABC!B3" which will bring through the clients name.

However, the sheet ABC will only be created once the spreadsheet is opened by the user for the first time. If I link the cell without the sheet yet being present, it returns #REF !

What would be the best way to deal with this? Perhaps a macro which runs on opening and puts the formula in then? Maybe a VBA code? Unsure of the best and most efficient way to handle this.

Thanks you!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
hello

to me it isn't clear what is being done
so that makes it nigh impossible to advise

as you best know what you're doing, just do anyway that works for you
if it isn't the most efficient way it won't matter

regards
 
Upvote 0
Hi, pls check usage in Sheet1 Cell D6 the following formula: "=IFERROR(INDRECT("ABC!B3"), "No sheet ABC")" - initially without sheet ABC, then adding sheet ABC.
 
Upvote 0
Hi gior,
Thank you! That was a good idea!
However, regardless of whether sheet ABC is present, D6 returns "No sheet ABC". Even if I select the formula and enter to refresh it, it still remains as "No sheet ABC"
 
Upvote 0
Hi, pls check usage in Sheet1 Cell D6 the following formula: "=IFERROR(INDRECT("ABC!B3"), "No sheet ABC")" - initially without sheet ABC, then adding sheet ABC.

Thanks again!! I played around with the formula and it now works! =IFERROR(INDIRECT("ABC!B3"),"")
Nice easy answer. Brilliant :)
 
Upvote 0
Hi, tlc53. The formula is working to me. If sheet ABC is present in same workbook with formula? If your formula "=ABC!B3" is working at this moment?
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,212
Members
453,023
Latest member
alabaz

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