keep cell reference
hi,
i have a cell in sheet_new with a formula in cell A1: = sheet1!C2 i would like to know how the cell A1 can keep this formula even if sheet1 is deleted, because it may be possible to delete the sheet1 and later add it back, so when it is added back, i want the formula remembered/restored. thanks in advance, geebee |
keep cell reference
This formula should work for you...
=IF(ISERROR(INDIRECT("Sheet1!A1")), "No Sheet1", INDIRECT("Sheet1!A1")) -- HTH... Jim Thomlinson "geebee" wrote: hi, i have a cell in sheet_new with a formula in cell A1: = sheet1!C2 i would like to know how the cell A1 can keep this formula even if sheet1 is deleted, because it may be possible to delete the sheet1 and later add it back, so when it is added back, i want the formula remembered/restored. thanks in advance, geebee |
keep cell reference
basically just set up a macro that adds a sheet and then the formula
maybe give some more info as to what you're doing, if this doesn't help Sub Add_Sheet() Worksheets.Add after:=Worksheets(Worksheets.Count) Range("A1").Formula = "=Sheet1!C2" End Sub -- Gary "geebee" (noSPAMs) wrote in message ... hi, i have a cell in sheet_new with a formula in cell A1: = sheet1!C2 i would like to know how the cell A1 can keep this formula even if sheet1 is deleted, because it may be possible to delete the sheet1 and later add it back, so when it is added back, i want the formula remembered/restored. thanks in advance, geebee |
keep cell reference
Unless sheet1!a1 contains an error <vbg:
=IF(ISERROR(CELL("Address",INDIRECT("'Sheet1'!A1") )), "No Sheet1","yourformulahere") Jim Thomlinson wrote: This formula should work for you... =IF(ISERROR(INDIRECT("Sheet1!A1")), "No Sheet1", INDIRECT("Sheet1!A1")) -- HTH... Jim Thomlinson "geebee" wrote: hi, i have a cell in sheet_new with a formula in cell A1: = sheet1!C2 i would like to know how the cell A1 can keep this formula even if sheet1 is deleted, because it may be possible to delete the sheet1 and later add it back, so when it is added back, i want the formula remembered/restored. thanks in advance, geebee -- Dave Peterson |
keep cell reference
it is not working. nothing is happening. i even tried =INDIRECT(TEST1!F20)
and i get a #REF! error. "Jim Thomlinson" wrote: This formula should work for you... =IF(ISERROR(INDIRECT("Sheet1!A1")), "No Sheet1", INDIRECT("Sheet1!A1")) -- HTH... Jim Thomlinson "geebee" wrote: hi, i have a cell in sheet_new with a formula in cell A1: = sheet1!C2 i would like to know how the cell A1 can keep this formula even if sheet1 is deleted, because it may be possible to delete the sheet1 and later add it back, so when it is added back, i want the formula remembered/restored. thanks in advance, geebee |
keep cell reference
Watch your double quotes:
=indirect("test1!f20") geebee wrote: it is not working. nothing is happening. i even tried =INDIRECT(TEST1!F20) and i get a #REF! error. "Jim Thomlinson" wrote: This formula should work for you... =IF(ISERROR(INDIRECT("Sheet1!A1")), "No Sheet1", INDIRECT("Sheet1!A1")) -- HTH... Jim Thomlinson "geebee" wrote: hi, i have a cell in sheet_new with a formula in cell A1: = sheet1!C2 i would like to know how the cell A1 can keep this formula even if sheet1 is deleted, because it may be possible to delete the sheet1 and later add it back, so when it is added back, i want the formula remembered/restored. thanks in advance, geebee -- Dave Peterson |
All times are GMT +1. The time now is 11:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com