Macro for Vlookup

dshafique

Board Regular
Joined
Jun 19, 2017
Messages
171
Hey everyone, I have this report I pull form online which has daily updated dollar values for projects. What I do is, I open my list, and do vlookup using the project code to fill in the dollar values for the projects. However, the issue I have is that there are some projects which share the same project code, so I get duplicate values and it throws off my overall numbers. Is there a way for me to use a macro which only pulls the values for the first instance of the project code? or is there a vlookup/match indx formula which could do that for me as well?

thanks in advance
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

It's not entirely clear what is needed here. A VLOOKUP will return the first value, maybe you need to add a sort in there first if you're getting the wrong instance? Some sample data, with your current and expected results would be helpful in finding the solution for you.

As far as a macro goes, sounds like you just need to enter a formula somewhere and drag it down. Try the macro recorder and share your results if you need tweaks made.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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