Eliminating Duplicate Data

jrummel

New Member
Joined
Jun 24, 2008
Messages
2
I have a list of customer data and for some customers there are multiple records or rows of data. I am using the customer numbers from this list to vlookup cost data from another spreadsheet. Of course, when I do the vlookup, the cost data value is returned for every row that the customer number is repeated on the original list. Does anyone know how to pull the data in a vlookup formula only once? I've tried embedded formulas and can't seem to get the right one to do the job.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

cornflakegirl

Well-known Member
Joined
Nov 4, 2004
Messages
2,023
Welcome to the board.

You could use advanced filter or a pivot table to generate a unique list of customers.

Alternatively, assuming your customer numbers start in A1, try this formula:
=VLOOKUP(A1,LookupRange,2,FALSE)*(COUNTIF($A$1:A1,A1)=1)

This will only pull the vlookup value for the first instance of the customer value.
 
Upvote 0

Forum statistics

Threads
1,190,681
Messages
5,982,225
Members
439,769
Latest member
trungminh2802

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
Top