Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Replacing export with descriptions -Vlookup Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joey - 20 Apr 2008 03:36 GMT
I have a monthly report that I export from an old system.  
Column A contains a number and I have been using VLookup to reference the
description of the number  from Worksheet2 Column A, B with Column B listing
the description.  

Is there a way of creating a macro to do this?  If so, will I still have to
create an empty column for the result or can the macro replace the data in
the cell?

Thanks!
Shane Devenshire - 20 Apr 2008 17:00 GMT
Hi Joey,

You can write a macro.  The macro could replace the cell containing the
number.  Something like this:

Sub mytest()
   For Each cell In Selection
       cell.Value = WorksheetFunction.VLookup(cell, [Table], 2, False)
   Next cell
End Sub

Where Table is the range name of the table on Worksheet2.

Cheers,
Shane Devenshire
Microsoft Excel MVP

> I have a monthly report that I export from an old system.
> Column A contains a number and I have been using VLookup to reference the
[quoted text clipped - 8 lines]
>
> Thanks!

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.