Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lookup - copy.paste values 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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy paste values macro | Excel Discussion (Misc queries) | |||
Macro for copy and paste values | Excel Discussion (Misc queries) | |||
Help with VBA Macro to automatically copy/paste as Values | Excel Programming | |||
lookup,copy, paste macro?? | Excel Programming | |||
Copy & Paste values macro...almost there? | Excel Programming |