#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Vlookup Macro?

I would like to use vlookup in a macro. I have a simple form in excel that
looks up information in a database. I wrote a simple macro that copies that
copies the information into another tab dropping down each time and then
refilling the formulas to pull data back from the database.

I need to be able to have my macro lookup into the database and overwrite
the original row based on the name.

How do I write a vlookup into a macro?

""Sheets("Fill Db").Select
Range("b2:bf2").Select
Selection.Copy
Here is where I would like it to lookup (vlookup) based on the name in b2
from the sheet above find it in the sheet below and then copy value the
line.
Sheets("Final Database").Select
Range("b2:b250").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
Sheets("FillForm").Select
Range("c1:h1").Select
Selection.Copy
Sheets("Profile Sheet").Select
Range("c1").Select
ActiveSheet.Paste
Sheets("FillForm").Select
Range("a2:h37").Select
Selection.Copy
Sheets("Profile Sheet").Select
Range("a2").Select
ActiveSheet.Paste""

Any help is greatly appreciated.

TIA
C
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup macro MikeD1224 New Users to Excel 1 June 16th 07 04:37 AM
Replace Vlookup with a macro Arain Excel Discussion (Misc queries) 1 September 27th 06 09:32 AM
problem with Vlookup in macro Richard Excel Discussion (Misc queries) 2 June 20th 06 02:22 PM
VLOOKUP in a macro?? chip_pyp Excel Discussion (Misc queries) 1 March 27th 06 09:40 PM
Adding a Macro to a VLookup Function Wanda H. Excel Discussion (Misc queries) 1 August 16th 05 08:37 PM


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"