Vlookup Only The First Lookup Value

anconavince

New Member
Joined
Nov 12, 2019
Messages
6
Hello,
I think I have a fairly simple problem (but one I can't fix). Column A of sheet "Model" has hundreds of thousands of account numbers, many of which are duplicates. I need to vlookup based on those account numbers to return data from Column B of sheet "Cost", but I only want to return data for the first occurrence of each account number in sheet "Model".
I've tried a nested IF formula but can't quite get it to work. Thank you in advance for any help.
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,542
Office Version
365
Platform
Windows
Hi & welcome to MrExcel.
How about something like
=IF(COUNTIF(A$2:A2,A2)=1,your Vlookup formula,"")
 

anconavince

New Member
Joined
Nov 12, 2019
Messages
6
Hi Fluff, thank you. I now realize I should come up with a better username haha.

So this formula works to pull my vlookup, but it doesn't quite eliminate the issue I'm having. My goal is to only return column B of sheet "Cost" for the first of multiple account numbers in column A of "Model" so that I can pivot without duplicate cost data. Does that make sense?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,542
Office Version
365
Platform
Windows
That formula will only run the vlookup the first time an account appears, all subsequent times the formula will return ""
 

Forum statistics

Threads
1,089,271
Messages
5,407,310
Members
403,132
Latest member
Black_Mamba_1666

This Week's Hot Topics

Top