Build VLOOKUP list from a range

spiker7221

New Member
Joined
Jun 23, 2011
Messages
2
I want to search the data in a column, and create a new column of just the differences in that data.
Example.......
Column B has a list of say...types of cats. The column will have several rows with duplicate cat types. I want to populate a new column C with a shorter list of cat types without any duplicates. I want to use column C to run a VLOOKUP and compare it to column B and when it finds a certain value, it will prefix it with data from another column. The reason for this formula is the actual data in column B will change weekly. Basically wanting to automate creating a VLOOKUP range.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I want to search the data in a column, and create a new column of just the differences in that data.
Example.......
Column B has a list of say...types of cats. The column will have several rows with duplicate cat types. I want to populate a new column C with a shorter list of cat types without any duplicates. I want to use column C to run a VLOOKUP and compare it to column B and when it finds a certain value, it will prefix it with data from another column. The reason for this formula is the actual data in column B will change weekly. Basically wanting to automate creating a VLOOKUP range.

Let B2:B15 house the cat types.

In C1 enter: #List#

C2, control+shift+enter, not just enter, and copy down:
Code:
=IFERROR(INDEX(B$2:B$15,MODE(IF(B$2:B$15<>"",
    IF(ISNA(MATCH(B$2:B$15,C$1:C1,0)),
      MATCH(B$2:B$15,B$2:B$15,0)*{1,1})))),"")
 
Upvote 0
I want to search the data in a column, and create a new column of just the differences in that data.
Example.......
Column B has a list of say...types of cats. The column will have several rows with duplicate cat types. I want to populate a new column C with a shorter list of cat types without any duplicates. I want to use column C to run a VLOOKUP and compare it to column B and when it finds a certain value, it will prefix it with data from another column. The reason for this formula is the actual data in column B will change weekly. Basically wanting to automate creating a VLOOKUP range.
You lost me on the VLOOKUP stuff.

Here's how you can extract the unique TEXT values from a list.

Book1
BC
2Cat9Cat9
3Cat3Cat3
4Cat9Cat4
5Cat4Cat10
6Cat9Cat2
7Cat4Cat7
8Cat10_
9Cat2_
10Cat10_
11Cat3_
12Cat7_
13Cat7_
14Cat10_
15Cat3_
Sheet1

Assumes no empty cells within the data range of column B.

Enter this formula in C2:

=B2

Enter this array formula** in C3:

=LOOKUP("zzz",CHOOSE({1,2},"",INDEX(B$2:B$15,MATCH(0,COUNTIF(C$2:C2,B$2:B$15),0))))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Copy down until you get blanks.
 
Upvote 0
Thanks T. Valko that worked perfectly. it will save me a lot of time keying in the values every week!

You rock!
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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