#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup

I have two worksheets, same format, different data. Let's say for simplicity
worksheet one has numbers from 1 to 100 and worksheet 2 from 101 to 200. On
a third worksheet I want to have a search feature, so that if I am looking
for number 20 it looks for it on both sheets, another example would be 150,
it needs to seach both worksheets and provide an answer in the cell. Thansk!
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup

No, if I am looking for 150, it wouldn't be on the first worksheet with
numbers from 1 - 100, but I don't know that from my search page. Also the
numbers are randon, not in order.

"Don Guillett" wrote:

Is there more than one answer possible, such as one on each sheet?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"thecdnmole" wrote in message
...
I have two worksheets, same format, different data. Let's say for
simplicity
worksheet one has numbers from 1 to 100 and worksheet 2 from 101 to 200.
On
a third worksheet I want to have a search feature, so that if I am looking
for number 20 it looks for it on both sheets, another example would be
150,
it needs to seach both worksheets and provide an answer in the cell.
Thansk!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Vlookup

How about something like this, in say Sheet3's B1:
=IF(ISNA(VLOOKUP(A1,Sheet1!A:B,2,0)),IF(ISNA(VLOOK UP(A1,Sheet2!A:B,2,0)),"",VLOOKUP(A2,Sheet2!A:B,2, 0)),VLOOKUP(A1,Sheet1!A:B,2,0))

Above looks A1 up in Sheet1, then in Sheet2
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote:
No, if I am looking for 150, it wouldn't be on the first worksheet with
numbers from 1 - 100, but I don't know that from my search page. Also the
numbers are randon, not in order.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup

Thanks, will this lookup the whole column of numbers from 1-100 and 101-200
or just what's in cell A1?

"Max" wrote:

How about something like this, in say Sheet3's B1:
=IF(ISNA(VLOOKUP(A1,Sheet1!A:B,2,0)),IF(ISNA(VLOOK UP(A1,Sheet2!A:B,2,0)),"",VLOOKUP(A2,Sheet2!A:B,2, 0)),VLOOKUP(A1,Sheet1!A:B,2,0))

Above looks A1 up in Sheet1, then in Sheet2
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote:
No, if I am looking for 150, it wouldn't be on the first worksheet with
numbers from 1 - 100, but I don't know that from my search page. Also the
numbers are randon, not in order.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup

IT WORKS!!! Thank-you!!!

"Max" wrote:

How about something like this, in say Sheet3's B1:
=IF(ISNA(VLOOKUP(A1,Sheet1!A:B,2,0)),IF(ISNA(VLOOK UP(A1,Sheet2!A:B,2,0)),"",VLOOKUP(A2,Sheet2!A:B,2, 0)),VLOOKUP(A1,Sheet1!A:B,2,0))

Above looks A1 up in Sheet1, then in Sheet2
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote:
No, if I am looking for 150, it wouldn't be on the first worksheet with
numbers from 1 - 100, but I don't know that from my search page. Also the
numbers are randon, not in order.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup

I have one column that is left of the balance of the vlookup colkumns and
used index to find the answer, can that be done similar to what you did with
the vlookup on two sheets, but left side lookup?

"Max" wrote:

How about something like this, in say Sheet3's B1:
=IF(ISNA(VLOOKUP(A1,Sheet1!A:B,2,0)),IF(ISNA(VLOOK UP(A1,Sheet2!A:B,2,0)),"",VLOOKUP(A2,Sheet2!A:B,2, 0)),VLOOKUP(A1,Sheet1!A:B,2,0))

Above looks A1 up in Sheet1, then in Sheet2
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote:
No, if I am looking for 150, it wouldn't be on the first worksheet with
numbers from 1 - 100, but I don't know that from my search page. Also the
numbers are randon, not in order.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Vlookup

Yes, of course, it'll work just as well with the more versatile INDEX/MATCH

An INDEX/MATCH example along the same lines as the earlier:
=IF(ISNA(MATCH(A1,Sheet1!B:B,0)),IF(ISNA(MATCH(A1, Sheet2!B:B,0)),"",INDEX(Sheet2!A:A,MATCH(A2,Sheet2 !B:B,0))),INDEX(Sheet1!A:A,MATCH(A2,Sheet1!B:B,0)) )

Above tries matching A1 in Sheet1's col B first, then IF no match is found,
it'll try in Sheet2's col B.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote in message
...
I have one column that is left of the balance of the vlookup colkumns and
used index to find the answer, can that be done similar to what you did
with
the vlookup on two sheets, but left side lookup?



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Vlookup

Aha, you got it! Welcome.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote in message
...
IT WORKS!!! Thank-you!!!



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup


This one is giving me trouble. You have B:B and also A:A. I want to search
column C and return the value in column A that matches the seach in C. I got
it to return the same valu in the column I searched (C), but I can't get it
to return the value in A.

"Max" wrote:

Yes, of course, it'll work just as well with the more versatile INDEX/MATCH

An INDEX/MATCH example along the same lines as the earlier:
=IF(ISNA(MATCH(A1,Sheet1!B:B,0)),IF(ISNA(MATCH(A1, Sheet2!B:B,0)),"",INDEX(Sheet2!A:A,MATCH(A2,Sheet2 !B:B,0))),INDEX(Sheet1!A:A,MATCH(A2,Sheet1!B:B,0)) )

Above tries matching A1 in Sheet1's col B first, then IF no match is found,
it'll try in Sheet2's col B.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote in message
...
I have one column that is left of the balance of the vlookup colkumns and
used index to find the answer, can that be done similar to what you did
with
the vlookup on two sheets, but left side lookup?






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Vlookup

Got it working, thanks again!!

"Max" wrote:

Yes, of course, it'll work just as well with the more versatile INDEX/MATCH

An INDEX/MATCH example along the same lines as the earlier:
=IF(ISNA(MATCH(A1,Sheet1!B:B,0)),IF(ISNA(MATCH(A1, Sheet2!B:B,0)),"",INDEX(Sheet2!A:A,MATCH(A2,Sheet2 !B:B,0))),INDEX(Sheet1!A:A,MATCH(A2,Sheet1!B:B,0)) )

Above tries matching A1 in Sheet1's col B first, then IF no match is found,
it'll try in Sheet2's col B.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"thecdnmole" wrote in message
...
I have one column that is left of the balance of the vlookup colkumns and
used index to find the answer, can that be done similar to what you did
with
the vlookup on two sheets, but left side lookup?




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 in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 02:25 PM.

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"