Visual Basic Code that does a Vlookup but retains formatting

dab448

New Member
Joined
Aug 21, 2015
Messages
1
Hi Everyone,

I am trying to basically do a Vlookup that can retain the font color and formatting. But as you can't do this with a Vlookup function, I need a Visual Basic function that can do this.

Can anyone help?

Thank you!!
Danielle
 

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.
You need to put this code in the sheet module for the worksheet in which you want to monitor changes.

Target is the range that changes and triggers the worksheet_change event. This is determined automatically by Excel. For example, if you enter "Hello" in cell A1, the Worksheet_Change event will trigger, and Target will be Range("A1").

If you copy A1 to B2:B4, then the Worksheet_Change event will trigger again, and Target will be Range("B2:B4").
 
Upvote 0

Forum statistics

Threads
1,216,744
Messages
6,132,468
Members
449,729
Latest member
davelevnt

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