Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Maxtrix
 
Posts: n/a
Default Lookup in table with two equal references

Hello:

I have a table that is monthly retrieved from an accounting
application. I post a table as an example:

Ref Product Seller Profit

1 A 1 4
2 B 1 7
2 B 2 9
3 C 1 3

In another table I must have the following results:

Ref Profit

1 4
2 7
2 9
3 3

There is no way I can change the reference numbers automatically. As
you can see, I can't use vlookup as it stops in the first cell that
matches the "2" Ref, retrieving always the same value 7.

The question is simple: how do I retrieve the "9" in the second "2"
reference ?

Thanks

M

  #2   Report Post  
Posted to microsoft.public.excel.misc
Stefi
 
Posts: n/a
Default Lookup in table with two equal references

The job in your example can be done by recording a simple macro that copies
column A (Ref) in table 1 to column A in table 2 and column D (Profit) in
table 1 to column B in table 2. Or is there something more complicated to be
done?

Regards,
Stefi


€žMaxtrix€ť ezt Ă*rta:

Hello:

I have a table that is monthly retrieved from an accounting
application. I post a table as an example:

Ref Product Seller Profit

1 A 1 4
2 B 1 7
2 B 2 9
3 C 1 3

In another table I must have the following results:

Ref Profit

1 4
2 7
2 9
3 3

There is no way I can change the reference numbers automatically. As
you can see, I can't use vlookup as it stops in the first cell that
matches the "2" Ref, retrieving always the same value 7.

The question is simple: how do I retrieve the "9" in the second "2"
reference ?

Thanks

M


  #3   Report Post  
Posted to microsoft.public.excel.misc
topola
 
Posts: n/a
Default Lookup in table with two equal references

Hi, your table looks like the reference number is corresponding to the
Product. What you are actually looking for is a Profit = function
(Product, Seller). Thus you are missing a Seller as the second
argument.

I would use another column A to concatenate Product and Seller
A2=B2&"_"&C2 where B2 is Product, C2 is Seller

Now you can vlookup new column A values.
--
HTH
Topola, http://vba.blog.onet.pl

  #4   Report Post  
Posted to microsoft.public.excel.misc
Maxtrix
 
Posts: n/a
Default Lookup in table with two equal references

Great! Simple and effective. Thanks a lot.

  #5   Report Post  
Posted to microsoft.public.excel.misc
topola
 
Posts: n/a
Default Lookup in table with two equal references

That's what I like most. KISS. Keep It Stupid Simple. e=mc2.
--
topola, www.seeit.ehost.pl

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
Need Help with lookup values in Table cank Excel Discussion (Misc queries) 4 November 10th 05 05:40 PM
Multiple table lookup KG Excel Discussion (Misc queries) 1 June 3rd 05 05:39 AM
can lookup a number to a 10x10 table? olasa Excel Worksheet Functions 0 June 1st 05 02:42 PM
auto fill data into a cell from a lookup table Tetradpoint Excel Discussion (Misc queries) 1 April 19th 05 04:46 PM
Table Lookup Rod Excel Worksheet Functions 3 April 15th 05 06:39 PM


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