+ Reply to Thread
Results 1 to 8 of 8

help referencing non existant tabs in worksheet

  1. #1
    Registered User
    Join Date
    02-18-2011
    Location
    dasss
    MS-Off Ver
    Excel 2003
    Posts
    11

    help referencing non existant tabs in worksheet

    I want to make a worksheet reference to a tab that will be imported later....
    I though I could to it by referencing a tab within the worksheet with the same formating of the future tab I would be importing....
    then...
    deleteing that tab and saving the worksheet.
    However when I did so excell deleted all my formulas and put in the '#ref' erorr....
    can I use an if then statement and do something like if tab exists....

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: help referencing non existant tabs in worksheet

    The formulas aren't deleted - the #Ref error is reporting that the formulas aren't able to reference the sheet. Try adding the sheet then check the formulas
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: help referencing non existant tabs in worksheet

    In the most basic form:

    Please Login or Register  to view this content.
    the above will return Null until such time as Sheet2 exists at which point it will return contents of Sheet2!A1

    note: INDIRECT is Volatile - see link for more info.

  4. #4
    Registered User
    Join Date
    02-18-2011
    Location
    dasss
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: help referencing non existant tabs in worksheet

    Quote Originally Posted by DonkeyOte View Post
    In the most basic form:

    Please Login or Register  to view this content.
    the above will return Null until such time as Sheet2 exists at which point it will return contents of Sheet2!A1

    note: INDIRECT is Volatile - see link for more info.
    Great that works, I just couldnt remember the code...been out of school for only 5 months....
    =IF(ISREF(INDIRECT("'sheet2'!A14"));INDIRECT("'sheet2'!A14");"")

    is what I used.. for 2007 excell
    >But I have a list of like 100 cells and I am having trouble auto filling by dragging the corner of the cell highlighted to copy the formula
    EG Cell 1
    =IF(ISREF(INDIRECT("'SHEETXXX''!A14"));INDIRECT("'SHEETXXX'!A14");"")
    EG Cell2
    =IF(ISREF(INDIRECT("'SHEETXXX'!A15"));INDIRECT("'SHEETXXX'!A15");"")
    EG Cell3
    =IF(ISREF(INDIRECT("'SHEETXXX'!A16"));INDIRECT("'SHEETXXX'!A16");"")
    EG Cell n+1...
    =IF(ISREF(INDIRECT("'SHEETXXX'!A1(N+1)..."));INDIRECT("'SHEETXXX'!A(N+1)...");"")

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: help referencing non existant tabs in worksheet

    In which cell does the first formula reside ?

    see post from earlier today which highlights the use of R1C1 notation with INDIRECT (for sake of auto fill)

  6. #6
    Registered User
    Join Date
    02-18-2011
    Location
    dasss
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: help referencing non existant tabs in worksheet

    Quote Originally Posted by DonkeyOte View Post
    In which cell does the first formula reside ?

    see post from earlier today which highlights the use of R1C1 notation with INDIRECT (for sake of auto fill)
    B38 in a another tab labeled LEAD wksht

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: help referencing non existant tabs in worksheet

    OK so assume LEAD!B38, B39, C38 are to reference SheetXXX!A14, A15, B14 etc then using R1C1

    Please Login or Register  to view this content.
    Note the first INDIRECT can always reference A1 - it's just checking to see if the sheet exists in the first instance.

    If you want to use A1 notation you can and is simple enough if you need only fill vertically, eg:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-18-2011
    Location
    dasss
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: help referencing non existant tabs in worksheet

    Awesome! thank you so much from Frankfurt.
    your right, I dont know why I was changing the 1st stmt :P

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1