#1   Report Post  
Armando Martellini
 
Posts: n/a
Default lookup

ok i really hope you can help me, i'll try to be more detailed as possible.
i have the following chart:
column A column B columnn C
unit# dept# new#
7112 101 725
7112 102 726
7112 103 727
7112 104 728
7112 105 729
7112 106 730
7113 101 311
7113 102 312
7113 103 313
7113 104 314
7113 105 315
7113 106 316
6880 101 725
6880 102 312
6880 103 313
6880 104 314
6880 105 729
6880 106 730
i need a formula that based upon the values in column A and B, returns the
specific value in column C, the value in column C varies according to the
location of the "unit" that's why i need a formula that takes in
consideration both unit# and dept#. i hope somebody can help me. i really
appreciate.
Armando Martellini
  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Armando Martellini wrote:
ok i really hope you can help me, i'll try to be more detailed as possible.
i have the following chart:
column A column B columnn C
unit# dept# new#
7112 101 725
7112 102 726
7112 103 727
7112 104 728
7112 105 729
7112 106 730
7113 101 311
7113 102 312
7113 103 313
7113 104 314
7113 105 315
7113 106 316
6880 101 725
6880 102 312
6880 103 313
6880 104 314
6880 105 729
6880 106 730
i need a formula that based upon the values in column A and B, returns the
specific value in column C, the value in column C varies according to the
location of the "unit" that's why i need a formula that takes in
consideration both unit# and dept#. i hope somebody can help me. i really
appreciate.
Armando Martellini


D2, copied down:

=A2&"#"&B2

Then:

[1] If you sort A:D on D in ascending order and can maintain A:D sorted,
invoke:

=IF(LOOKUP(X2&"#"&Y2,D:D)=X2&"#"&Y2,LOOKUP(X2&"#"& Y2,D:D,C:C),"")

[2] If sorting is not a viable option, invoke:

=INDEX(C:C,MATCH(X2&"#"&Y2,D:D,0))

Note that X2 houses a unit# and Y2 a dept# you want to look up.

Addendum. If you are on Excel 2003, turn the range in A:D into a list by
running the Data|List|Create List option and change the whole column
references in [1] and [2] into exact/definite ranges.
  #3   Report Post  
Armando Martellini
 
Posts: n/a
Default

thanks alot aladin, it worked great even without the 2nd part

"Aladin Akyurek" wrote:

Armando Martellini wrote:
ok i really hope you can help me, i'll try to be more detailed as possible.
i have the following chart:
column A column B columnn C
unit# dept# new#
7112 101 725
7112 102 726
7112 103 727
7112 104 728
7112 105 729
7112 106 730
7113 101 311
7113 102 312
7113 103 313
7113 104 314
7113 105 315
7113 106 316
6880 101 725
6880 102 312
6880 103 313
6880 104 314
6880 105 729
6880 106 730
i need a formula that based upon the values in column A and B, returns the
specific value in column C, the value in column C varies according to the
location of the "unit" that's why i need a formula that takes in
consideration both unit# and dept#. i hope somebody can help me. i really
appreciate.
Armando Martellini


D2, copied down:

=A2&"#"&B2

Then:

[1] If you sort A:D on D in ascending order and can maintain A:D sorted,
invoke:

=IF(LOOKUP(X2&"#"&Y2,D:D)=X2&"#"&Y2,LOOKUP(X2&"#"& Y2,D:D,C:C),"")

[2] If sorting is not a viable option, invoke:

=INDEX(C:C,MATCH(X2&"#"&Y2,D:D,0))

Note that X2 houses a unit# and Y2 a dept# you want to look up.

Addendum. If you are on Excel 2003, turn the range in A:D into a list by
running the Data|List|Create List option and change the whole column
references in [1] and [2] into exact/definite ranges.

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
lookup more than one cell andrewm Excel Worksheet Functions 20 June 14th 05 05:33 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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