Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
copy paste values macro Wanna Learn Excel Discussion (Misc queries) 5 July 21st 09 04:44 PM
Macro for copy and paste values excelnerd Excel Discussion (Misc queries) 3 March 8th 08 06:51 PM
Help with VBA Macro to automatically copy/paste as Values Anand Excel Programming 3 September 26th 05 08:32 PM
lookup,copy, paste macro?? Hugh Askew Excel Programming 3 May 1st 04 01:21 PM
Copy & Paste values macro...almost there? ste mac Excel Programming 5 November 2nd 03 10:49 PM


All times are GMT +1. The time now is 08:37 PM.

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"