Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup in a macro


Hi,

What I'm trying to do is search get a part number in a worksheet and
match that number with a separate .csv file that's open. I'm trying to
use Vlookup but am unsure of how to reference the .csv file any help
will be greatly appreciated!

TIA

Sheet1.Cells(row_Numb, 5).Value =
Application.VLookup(Sheet.Cells(row_Numb, 1).Value,
Inv.csv!$A$1:$G$250, 5, False)

This is what I have...


--
cultgag
------------------------------------------------------------------------
cultgag's Profile: http://www.excelforum.com/member.php...o&userid=22677
View this thread: http://www.excelforum.com/showthread...hreadid=512283

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Vlookup in a macro

Hi, try giving these links a look. I prefer the Index/Match functions
over VLookup because you are not constrained by the order the table is
arranged or sorting.

http://www.contextures.com/xlFunctions03.html

http://www.contextures.com/xlFunctions02.html

http://www.cpearson.com/excel/lookups.htm

HTH--Lonnie M.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Vlookup in a macro

Try

Application.VLookup(Sheet.Cells(row_Numb, 1).Value, _
Worksheets("Inv.csv").Range("$A$1:$G$250"), 5, False)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"cultgag" wrote in
message ...

Hi,

What I'm trying to do is search get a part number in a worksheet and
match that number with a separate .csv file that's open. I'm trying to
use Vlookup but am unsure of how to reference the .csv file any help
will be greatly appreciated!

TIA

Sheet1.Cells(row_Numb, 5).Value =
Application.VLookup(Sheet.Cells(row_Numb, 1).Value,
Inv.csv!$A$1:$G$250, 5, False)

This is what I have...


--
cultgag
------------------------------------------------------------------------
cultgag's Profile:

http://www.excelforum.com/member.php...o&userid=22677
View this thread: http://www.excelforum.com/showthread...hreadid=512283



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup in a macro


Thnx for the help and the quick response! This site is perfect!


--
cultgag
------------------------------------------------------------------------
cultgag's Profile: http://www.excelforum.com/member.php...o&userid=22677
View this thread: http://www.excelforum.com/showthread...hreadid=512283

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Vlookup in a macro

Actually, no-one on the site responded. You got one response from a guy in
Google, and mine was from within the public NGs <G

"cultgag" wrote in
message ...

Thnx for the help and the quick response! This site is perfect!


--
cultgag
------------------------------------------------------------------------
cultgag's Profile:

http://www.excelforum.com/member.php...o&userid=22677
View this thread: http://www.excelforum.com/showthread...hreadid=512283



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? blucajun Excel Worksheet Functions 0 June 27th 08 10:23 PM
VLOOKUP in a macro?? chip_pyp Excel Discussion (Misc queries) 1 March 27th 06 09:40 PM
Please help.. VLookup Macro STEVE BELL Excel Programming 3 August 3rd 05 05:31 PM
VLOOKUP in a Macro Peter Hesselager Excel Programming 5 May 7th 05 01:28 AM
Need a macro to do what this VLOOKUP does Tim Excel Programming 5 February 12th 04 04:41 PM


All times are GMT +1. The time now is 09:18 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"