Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RogueSwan
 
Posts: n/a
Default 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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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 ,
(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   Report Post  
RogueSwan
 
Posts: n/a
Default

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


JE McGimpsey wrote in message ...
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 ,
(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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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

In article ,
(RogueSwan) wrote:

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


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



All times are GMT +1. The time now is 11:52 AM.

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"