Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dr Phibes
 
Posts: n/a
Default Help needed on VLOOKUP

Hi,

I have a problem using VLOOKUP.

I have 7 sheets of data listing product codes and product descriptions

I need to write a VLOOKUP based upon cell A1 where the contract name is
located, and Cell B1 where the product code is located.

The product code can be repeated for different contracts but listing
different products hterebye stopping me from creating 1 sheet.

Is there a way of writing a VLOOKUP so that the product description appears
in cell C1 based upon the information in cell A1 and B1? In other words, so
that the VLOOKUP in cell C1 goes to the correct sheet for the contract.

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Help needed on VLOOKUP

Hi,
This is a reply from Peo Sjoblom on looking up values over mutiple
worksheets.

Hopefully you can adapt it to your need. It wasn't clear to me what the
relevance of the contract number is ... don't you only require the product
code from B1?

HTH

-----------------------------------------------------------------------------------------------------
If you have the lookup value in A2 on a summary sheet and the sheets you
want to lookup are Sheet1:Sheet8,
the table is A1:C200 and you want to return the value in the second column
(B)


=VLOOKUP(A2,INDIRECT("'"&INDEX({"Sheet1";"Sheet2"; "Sheet3";"Sheet4";"Sheet5";"Sheet6";"Sheet7";"Shee t8"},MATCH(1,--(COUNTIF(INDIRECT("'"&{"Sheet1";"Sheet2";"Sheet3"; "Sheet4";"Sheet5";"Sheet6";"Sheet7";"Sheet8"}&"'!A 1:A200"),A2)0),0))&"'!A1:C200"),2,0)

entered with ctrl + shift & enter

if you put all sheet names in a range of cells and give it a name it is less
ugly

=VLOOKUP(A2,INDIRECT("'"&INDEX(MySheets,MATCH(1,--(COUNTIF(INDIRECT("'"&MySheets&"'!A1:A200"),A2)0) ,0))&"'!A1:C200"),2,0)

where MySheets would hold the names



"Dr Phibes" wrote:

Hi,

I have a problem using VLOOKUP.

I have 7 sheets of data listing product codes and product descriptions

I need to write a VLOOKUP based upon cell A1 where the contract name is
located, and Cell B1 where the product code is located.

The product code can be repeated for different contracts but listing
different products hterebye stopping me from creating 1 sheet.

Is there a way of writing a VLOOKUP so that the product description appears
in cell C1 based upon the information in cell A1 and B1? In other words, so
that the VLOOKUP in cell C1 goes to the correct sheet for the contract.

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Help needed on VLOOKUP

"Dr Phibes" wrote:
I have 7 sheets of data listing product codes
and product descriptions

I need to write a VLOOKUP based upon cell A1
where the contract name is
located, and Cell B1 where the product code is located.

The product code can be repeated for different contracts
but listing different products thereby stopping me
from creating 1 sheet.

Is there a way of writing a VLOOKUP
so that the product description appears
in cell C1 based upon the information in cell A1 and B1?
In other words, so that the VLOOKUP in cell C1
goes to the correct sheet for the contract.


One way ..

Assuming that in a new sheet,
the sheetnames are listed in A1 down,
and in B1 down are the product codes
(sheetnames are assumed to be the contract names)

and in the 7 contract sheets,
the data is housed within cols A and B
Col A = product code, Col B = product descriptions

we could put in C1:
=VLOOKUP(B1,INDIRECT("'"&A1&"'!A:B"),2,0)
and copy down to return the product description
from the correct contract sheet (amongst the 7)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #4   Report Post  
Posted to microsoft.public.excel.misc
Dr Phibes
 
Posts: n/a
Default Help needed on VLOOKUP




Many thanks to both of you.

Sheet is now working correctly

  #5   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Help needed on VLOOKUP

"Dr Phibes" wrote:
Many thanks to both of you.
Sheet is now working correctly


Glad to hear that, and thanks for feedback
(quite a rare phenomena of late <g)

For thread completeness,
perhaps you could also indicate
which response worked for you (or both) ?
[it doesn't matter if it isn't mine]
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




  #6   Report Post  
Posted to microsoft.public.excel.misc
Dr Phibes
 
Posts: n/a
Default Help needed on VLOOKUP

Hi Max. yes, it was your solution. I tried that one first, merely because it
had less things in it to go wrong. I would like to thank Toppers too, both of
you responded quickly and gave me a number of options to solve my problem.

As for feedback. I always think that, if you say thank you, then you can ask
again next time :)

  #7   Report Post  
Posted to microsoft.public.excel.misc
Max
 
Posts: n/a
Default Help needed on VLOOKUP

"Dr Phibes" wrote:
Hi Max. yes, it was your solution.
I tried that one first, merely because it had less things
in it to go wrong. I would like to thank Toppers too,
both of you responded quickly and gave me a number
of options to solve my problem.


no prob .. even if it wasn't my response that worked <g

As for feedback. I always think that,
if you say thank you, then you can ask
again next time :)


imo, at the very least, feeding back to
responders provides closure to the post,
and for the responders, too !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup Help Needed nander Excel Discussion (Misc queries) 1 April 4th 06 07:40 PM
VLOOKUP code needed please j4ymf Excel Worksheet Functions 4 March 12th 06 07:48 PM
Vlookup Alternative Needed Rita Palazzi Excel Discussion (Misc queries) 3 March 2nd 06 04:14 PM
VLOOKUP help needed! MartinC Excel Worksheet Functions 1 January 12th 06 12:46 PM
Vlookup Help needed ASAP Vladimir Excel Worksheet Functions 7 October 15th 05 09:48 PM


All times are GMT +1. The time now is 06:25 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"