A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Vlookup and IF function problem



 
 
Thread Tools Display Modes
  #1  
Old June 22nd, 2004, 02:43 PM
yuste
external usenet poster
 
Posts: n/a
Default Vlookup and IF function problem

Hi,

I would like to do a kind of double Vlookup.
I have 2 different worksheets with following information:

Worksheet1 is the master file with all modells: 3 columns
A B C
B segment Honda Civic B
J segment Honda Civic Coupé
D segment Toyota Avensis D
...

Worksheet2 is the data file: 3 columns, of which 2 are filled

A B
C
B segment Honda Civic ...

J segment Honda Civic ...
D segment Toyota Avensis ...
...

I would like to get in the C column of worksheet 2 the results you find
in column C of worksheet 1.

So I believe it should look up: if a car belongs to the B segment and
it is a Honda Civic than it will be a "B" car according to the lookup
in worksheet 1.

Can somebody help me with this formula?
Thanks a lot in advance,

Steven


---
Message posted from http://www.ExcelForum.com/

  #2  
Old June 22nd, 2004, 02:58 PM
Domenic
external usenet poster
 
Posts: n/a
Default Vlookup and IF function problem

Hi Steve,

Try,

=INDEX(Sheet1!$C$1:$C$3,MATCH(1,(Sheet1!$A$1:$A$3= Sheet2!A1)*(Sheet1!$B$1:$B$3=Sheet2!B1),0))

Adjust the range to suit your data, enter the formula using
CTRL+SHIFT+ENTER, and copy down.

Hope this helps!

yuste wrote:
*Hi,

I would like to do a kind of double Vlookup.
I have 2 different worksheets with following information:

Worksheet1 is the master file with all modells: 3 columns
A / B / C
B segment / Honda Civic / B
J segment / Honda Civic / Coupé
D segment / Toyota Avensis / D
...

Worksheet2 is the data file: 3 columns, of which 2 are filled

A / B /
C
B segment / Honda Civic / ...

J segment / Honda Civic / ...

D segment / Toyota Avensis / ...
...

I would like to get in the C column of worksheet 2 the results you
find in column C of worksheet 1.

So I believe it should look up: if a car belongs to the B segment and
it is a Honda Civic than it will be a "B" car according to the lookup
in worksheet 1.

Can somebody help me with this formula?
Thanks a lot in advance,

Steven *



---
Message posted from http://www.ExcelForum.com/

  #3  
Old June 22nd, 2004, 03:10 PM
jeff
external usenet poster
 
Posts: n/a
Default Vlookup and IF function problem

Hi,

In my mind, the easiest way would be to add a helper
column in both sheets (or at least sheet1) which is
a combination of col A + Col B, then one simple vlookup
will still work great. You can always hide the helper.

hth.
jeff

-----Original Message-----
Hi,

I would like to do a kind of double Vlookup.
I have 2 different worksheets with following information:

Worksheet1 is the master file with all modells: 3 columns
A B C
B segment Honda Civic B
J segment Honda Civic Coup=E9
D segment Toyota Avensis =20

D =20
...

Worksheet2 is the data file: 3 columns, of which 2 are=20

filled

A =20

B =20
C =20
B segment Honda=20

Civic ... =20

J segment Honda=20

Civic ... =20
D segment Toyota=20

Avensis ...
...

I would like to get in the C column of worksheet 2 the=20

results you find
in column C of worksheet 1.

So I believe it should look up: if a car belongs to the=20

B segment and
it is a Honda Civic than it will be a "B" car according=20

to the lookup
in worksheet 1.

Can somebody help me with this formula?
Thanks a lot in advance,

Steven


---
Message posted from http://www.ExcelForum.com/

.

  #4  
Old June 22nd, 2004, 05:37 PM
Soo Cheon Jheong
external usenet poster
 
Posts: n/a
Default Vlookup and IF function problem

Hi,

Use one of these formulas in Sheet2!C1:

=INDIRECT("Sheet1!C"&MIN(IF((Sheet1!$A$1:$A$9=A1)
*(Sheet1!$B$1:$B$9=B1),ROW(Sheet1!$C$1:$C$9),"")))

or

=INDIRECT("Sheet1!C"&MAX((Sheet1!$A$1:$A$9=A1)
*(Sheet1!$B$1:$B$9=B1)*ROW(Sheet1!$C$1:$C$9)))

or

=INDIRECT("Sheet1!C"&MAX((Sheet1!$A$1:$A$9&
Sheet1!$B$1:$B$9=A1&B1)*ROW(Sheet1!$C$1:$C$9)))

then drag and fill down.


--
Regards,
Soo Cheon Jheong
Seoul, Korea
_ _
^¢¯^
--


  #5  
Old June 24th, 2004, 07:43 AM
yuste
external usenet poster
 
Posts: n/a
Default Vlookup and IF function problem

Thanks a lot guys for the big help. Very much appreciated!!! It works
out.


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.