#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default VLOOKUP in VBA

Hi,

I need to do a simple VLOOKUP through visual basic. All I want to do
is set one of my variables equal to the result of a formula that would
normally read:

=VLOOKUP($C6,Codes!$B$C,2,FALSE)

Things I don't want to do:
Use a cell for the formula
Use R[] C[] coding
Define names

Is there any way to do this?

Thanks!

Brett

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default VLOOKUP in VBA

myVal =
Application.VLOOKUP(Range("C6").Value,Worksheets(" Codes").Range("B:C"),2,FAL
SE)


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
Hi,

I need to do a simple VLOOKUP through visual basic. All I want to do
is set one of my variables equal to the result of a formula that would
normally read:

=VLOOKUP($C6,Codes!$B$C,2,FALSE)

Things I don't want to do:
Use a cell for the formula
Use R[] C[] coding
Define names

Is there any way to do this?

Thanks!

Brett



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default VLOOKUP in VBA

Thank you!

Bob Phillips wrote:
myVal =
Application.VLOOKUP(Range("C6").Value,Worksheets(" Codes").Range("B:C"),2,FAL
SE)


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
Hi,

I need to do a simple VLOOKUP through visual basic. All I want to do
is set one of my variables equal to the result of a formula that would
normally read:

=VLOOKUP($C6,Codes!$B$C,2,FALSE)

Things I don't want to do:
Use a cell for the formula
Use R[] C[] coding
Define names

Is there any way to do this?

Thanks!

Brett


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 a Vlookup adamb2000 Excel Worksheet Functions 4 June 28th 06 10:54 PM
VLOOKUP Problem Ian Excel Discussion (Misc queries) 3 April 6th 06 06:47 PM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


All times are GMT +1. The time now is 07:46 PM.

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

About Us

"It's about Microsoft Excel"