+ Reply to Thread
Results 1 to 5 of 5

keep formula referencing sheet when sheet is removed

  1. #1
    Registered User
    Join Date
    11-20-2008
    Location
    Australia
    Posts
    5

    keep formula referencing sheet when sheet is removed

    Hey all, I'm stuck on an issue here.
    I have a report macro that is run after importing data from a website.
    When that report runs it creates multiple sheets, one of which is a formulas sheet.
    The formula's that are in the sheet are referencing a second sheet in the same workbook.
    Eg: Formula in sheet1; cell F2: =COUNTIF(Wireless!F:F,Wireless!F2)>1. references Sheet2; Cell F2.

    If sheet2 is deleted then the formula in Sheet1 changes to: =COUNTIF(#REF!F:F,#REF!F2)>1.

    Is there a way I can avoid this.

    I have tried locking the cells and the sheet but the formula result does not update as a result of this.

    Cheers

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    pastespecial

    Hi
    Locking is not a solution. Depending on the number of cells with formula, you can copy and pastespecial-values only (overwrite) before deleting sheet2. you can also use macro.

    Please Login or Register  to view this content.
    Ravi

  3. #3
    Registered User
    Join Date
    11-20-2008
    Location
    Australia
    Posts
    5
    Thanks for that Ravi. \
    I am using a macro at the moment, I was just hoping there was a way to avoid having to write the formulas page every time the macro is run as it is a bit time consuming.
    I was looking to have the formula's pre written into the master book but hidden so no one could touch them.

    Cheers anyway.

    Bill

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Maybe try a different formula:

    =COUNTIF(INDIRECT("Wireless!F:F"), INDIRECT("Wireless!F2") ) > 1
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    11-20-2008
    Location
    Australia
    Posts
    5
    Thanks SHG,
    Tried that and it does not reference the cell correctly. Gives me true when should be false??

    Cheers for that anyway.

    Bill

+ 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