Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KKerig
 
Posts: n/a
Default multiple lookups - xls2003

I am close to getting this formula correct but can't seem to get it just right.

sheet1 I have:
Customer Name Line 1 Address City State Zip
ACADIA PHARMACEUTICALS SAN DIEGO CA 92121
ALEXION ANTIBODY SAN DIEGO CA 92121
UNIVERSITY OF SOUTH MOBILE AL 36688
UNIVERSITY OF SOUTH MOBILE AL 36688

sheet2 I have a defined name for my data called "products" This sheet
contains data such as:
Zip Name City
State Rep
92121 ACADIA PHARMACEUTICALS SAN DIEGO CA RHENSLEYPA
92121 ACADIA PHARMACEUTICALS SAN DIEGO CA RHENSLEYPA
92121 ADVENTRX PHARMACEUTICALS SAN DIEGO CA RCATONMA

Even though the zip is the same in sheet2 I need to show the different Rep
name based on the different customer name.

I have my formula like this: =INDEX(D3,MATCH(1,(products)*(A3)*(products),0))

What am I doing wrong?

Thank you in advance!
Rogers
  #2   Report Post  
Max
 
Posts: n/a
Default

In Sheet1
----------
Try, array-entered (press CTRL+SHIFT+ENTER) in say, F2:

=INDEX(Sheet2!$E$2:$E$100,MATCH(TRIM(D2)&"_"&TRIM( A2),Sheet2!$A$2:$A$100&"_"
&Sheet2!$B$2:$B$100,0))

Copy F2 down

Above assumes Cust name and zip are in cols A and D in Sheet1,
while Cust name, zip and Rep names are in cols A, D and E in Sheet2 (all
data taken to be from row2 down)

Adapt the ranges to suit ..

And perhaps better with an error trap to return blanks instead of #NAs, we
could put instead in F2:

=IF(ISNA(MATCH(TRIM(D3)&"_"&TRIM(A3),Sheet2!$A$2:$ A$100&"_"&Sheet2!$B$2:$B$1
00,0)),"",INDEX(Sheet2!$E$2:$E$100,MATCH(TRIM(D3)& "_"&TRIM(A3),Sheet2!$A$2:$
A$100&"_"&Sheet2!$B$2:$B$100,0)))

and copy F2 down, as before

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"KKerig" wrote in message
...
I am close to getting this formula correct but can't seem to get it just

right.

sheet1 I have:
Customer Name Line 1 Address City State Zip
ACADIA PHARMACEUTICALS SAN DIEGO CA 92121
ALEXION ANTIBODY SAN DIEGO CA 92121
UNIVERSITY OF SOUTH MOBILE AL 36688
UNIVERSITY OF SOUTH MOBILE AL 36688

sheet2 I have a defined name for my data called "products" This sheet
contains data such as:
Zip Name City
State Rep
92121 ACADIA PHARMACEUTICALS SAN DIEGO CA RHENSLEYPA
92121 ACADIA PHARMACEUTICALS SAN DIEGO CA RHENSLEYPA
92121 ADVENTRX PHARMACEUTICALS SAN DIEGO CA RCATONMA

Even though the zip is the same in sheet2 I need to show the different Rep
name based on the different customer name.

I have my formula like this:

=INDEX(D3,MATCH(1,(products)*(A3)*(products),0))

What am I doing wrong?

Thank you in advance!
Rogers



  #3   Report Post  
Max
 
Posts: n/a
Default

Clarification: The formulas in col F in Sheet1 will return the Rep names
from Sheet2, matched using a combination of Cust name & Zip (as match on Zip
alone is not sufficient - not unique). Unmatched cases will return #NAs or
blanks (with the error trap).
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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
Lookups vs Match Bob Alford Excel Worksheet Functions 2 March 10th 05 04:49 PM
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
adding certain cells in multiple worksheets in multiple workbooks Stephen via OfficeKB.com Excel Worksheet Functions 1 February 4th 05 08:31 PM
Return Multiple Results with Lookup Josh O. Excel Worksheet Functions 1 February 4th 05 08:07 PM
XML / parent with multiple children and with multiple children Richard Excel Discussion (Misc queries) 0 January 5th 05 11:49 AM


All times are GMT +1. The time now is 10:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"