VLookup help

THE_NEWBIE

New Member
Joined
May 10, 2005
Messages
4
Hi there !

This is my first post on this board. As you will see, english is not the language i usually speak, so i hope you'll understand :wink:

Here's my little problem...

I'm using 2 basic sheets with 2 columns on each. On the first sheet, Column A = Numbers. Column B = Colours.

On the second sheet, i'm using the Vlookup function to find what colour matches the number i enter.

The problem is that i have 2 identical numbers, with diffrent colours associtated with. So when i'm doing the VLookup function, i only get the first (upper) colour.

My goal is to have both colours in two diffrent cells without using the "true" argument (D9 should have "yellow" written and D10 should have "black")

Here's a little example...

Your help would be greatly appreciated.

Thanks !!

-THE (FRENCH) NEWBIE


:)

Removed by Admin
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
for some odd reason, nothing shows beyond the bottom of original post. No, replies or even the bottom of the original post.
 
Upvote 0
Hi

This does assume that there is a max of 2 entries for the one number.

In the first cell (D9), you can use your vlookup as per normal.

In D10, array enter (ctrl, shift, enter) the following formula
Code:
=IF(COUNTIF(A2:A7,E2)>1, INDEX(B1:B7,LARGE((A2:A7=E2)*(ROW(A2:A7)),1)),"")

It will have to be updated for:
1) the cell that will house the number being tested - it is E2 in the formula
2) The range of data
3) The sheet name for the source data.

HTH

Tony
 
Upvote 0

Forum statistics

Threads
1,221,645
Messages
6,161,044
Members
451,682
Latest member
ogoreo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top