Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nesting a sheet name reference within a cell reference??? Broyston Excel Discussion (Misc queries) 9 July 8th 08 08:35 PM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
absolute cell reference A spreadsheet cell reference that does no help Excel Discussion (Misc queries) 1 January 18th 06 06:56 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


All times are GMT +1. The time now is 01:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"