Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-27-2011, 02:48 PM
primmer3001 primmer3001 is offline Vlookup in VBA for new starter Windows 7 32bit Vlookup in VBA for new starter Office 2003
Novice
Vlookup in VBA for new starter
 
Join Date: Jul 2011
Posts: 5
primmer3001 is on a distinguished road
Default Vlookup in VBA for new starter

I need help in creating a macro to do a Vlookup, I'm new at VBA & some assistance is greatly needed. I know how to do it in excel as a formula, but cannot get it to work in VBA. The problem I have is that I'm not using the same cell every time. My coding is as followed:

'Main Log Sheet
'
rownum = Range("'Feedback'!E3").End(xlDown).Row + 1


'Data entered below

Range("'Feedback'!E" & rownum) = "FB" & rownum
Range("'Feedback'!F" & rownum).Formula = "=VLOOKUP(K & rownum,Users!A2:D110, 4, 0)"


Range("'Feedback'!g" & rownum) = Now
Range("'Feedback'!H" & rownum) = txtaccnum.Value

All the rest work except for the Vlookup. I'm adding data into a sheet so the Vlookup will need to be looking at cell column k but a different number everytime & if possible, paste the value rather than the code in column F. Please help!!!!!!!!!!!!
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Vlookup & IF together thelauncher Excel 5 08-25-2013 11:32 PM
Office 2010 Starter runs only for admins jsussman Office 0 05-16-2011 10:32 AM
Vlookup in VBA for new starter Can i do this with a VLookup? foodstudent Excel 1 01-21-2011 12:34 AM
Using IF & VLOOKUP together junction Excel 7 11-18-2010 05:15 AM
Help with VLOOKUP sakhtar Excel 2 07-24-2010 07:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft