+ Reply to Thread
Results 1 to 4 of 4

vlookup and filename returning same result on each sheet.

Hybrid View

  1. #1
    RogueSwan
    Guest

    vlookup and filename returning same result on each sheet.

    Hi,

    This is my first post with this group even though I have used a lot of
    the postings to solve my problems, thanks.

    My problem is this:

    I have a workbook with about 40 sheets in it. Each sheet name is also
    a reference number. I use this reference number is a vlookup formula
    as follows

    =VLOOKUP(VALUE(MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)),List!$A$3:$G$70,COLUMN()+1,FALSE)

    The problem I have with this is that each sheet has the same result.
    Say I look at sheet 25, if I do a recalc then the correct answer comes
    through the formula. If I then move to sheet 33 it has the same
    results as sheet 25 until I do a recalc. This unfortunately then
    changes sheet 25's result to the same as sheet 33. What am I missing?

  2. #2
    JE McGimpsey
    Guest

    Re: vlookup and filename returning same result on each sheet.

    You need to include the second argument in the CELL() function - by
    default it uses the last sheet calculated. Try:

    =VLOOKUP(VALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,25
    5)),List!$A$3:$G$70,COLUMN()+1,FALSE)



    In article <8e49e469.0503211829.5292391a@posting.google.com>,
    pranainsight@yahoo.com.au (RogueSwan) wrote:

    > The problem I have with this is that each sheet has the same result.
    > Say I look at sheet 25, if I do a recalc then the correct answer comes
    > through the formula. If I then move to sheet 33 it has the same
    > results as sheet 25 until I do a recalc. This unfortunately then
    > changes sheet 25's result to the same as sheet 33. What am I missing?


  3. #3
    RogueSwan
    Guest

    Re: vlookup and filename returning same result on each sheet.

    Thanks for the reply, I realised about five minutes after I posted
    that needed the second argument.


    JE McGimpsey <jemcgimpsey@mvps.org> wrote in message news:<jemcgimpsey-2A2B98.20421621032005@msnews.microsoft.com>...
    > You need to include the second argument in the CELL() function - by
    > default it uses the last sheet calculated. Try:
    >
    > =VLOOKUP(VALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,25
    > 5)),List!$A$3:$G$70,COLUMN()+1,FALSE)
    >
    >
    >
    > In article <8e49e469.0503211829.5292391a@posting.google.com>,
    > pranainsight@yahoo.com.au (RogueSwan) wrote:
    >
    > > The problem I have with this is that each sheet has the same result.
    > > Say I look at sheet 25, if I do a recalc then the correct answer comes
    > > through the formula. If I then move to sheet 33 it has the same
    > > results as sheet 25 until I do a recalc. This unfortunately then
    > > changes sheet 25's result to the same as sheet 33. What am I missing?


  4. #4
    JE McGimpsey
    Guest

    Re: vlookup and filename returning same result on each sheet.

    next time you might consider posting a reply to your own article, then.
    My post came more than an hour after yours...

    In article <8e49e469.0503221258.42397c71@posting.google.com>,
    pranainsight@yahoo.com.au (RogueSwan) wrote:

    > Thanks for the reply, I realised about five minutes after I posted
    > that needed the second argument.
    >
    >


+ 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