Consulting

Results 1 to 5 of 5

Thread: Solved: Strange behaviour of =cell("filename",A1) formula

  1. #1
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location

    Solved: Strange behaviour of =cell("filename",A1) formula

    Hi There,

    I have discovered something very interesting and I would like someone to explain it to me.

    What I have discovered is, that as long as there is a formula, any formula, somewhere in a workbook that has a result of "#REF!", formulas that use "cell("filename",A1)" anywhere in the formula will be updated before the file is saved under a new name, while saving.

    In other words the "cell("filename",A1)" formula is already updated with the new name in the saved version. Without the "#REF!" formula, the saved version still has the old file name and only updates when the file is opened again.

    It is actually quite useful.

    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Useful maybe, but do we want a formula with an error floating about?

    Does the same thing happen if you create a defined name that resolves to #REF instead of a formula in a cell?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location
    Hi xld,

    Unfortunately not. Only works if the formula is on one of the sheets.

    vanhunk

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Yeah I tried it myself and it keeps firing the browse dialog - not good
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Tutor
    Joined
    Jun 2012
    Posts
    240
    Location
    I marked it SOLVED as I believe there is nobody out there that can give an answer.

Posting Permissions

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