Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 313
Default using variable names in VLOOKUP

I am using a line of code that uses a variable to look at a set sheet and it
works great. The "TwoMonthsAgo" variable is what I am using to look at a
sheet named "Sep04"

Activecell.formulaR1C1 = "=VLOOKUP(RC1, ' " & TwoMonthsAgo & " ' !C1:C[82],
82, FALSE)"

Now I have another variable "TrendFile" that is the name of the workbook
that the "Sep04" sheet is in. The problem I am having in setting up the
VLOOKUP function from another workbook. I would like to be in workbook-A and
look at the "TrendFile" workbook on sheet "TwoMonthsAgo".

Thanks for any help you can give.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default using variable names in VLOOKUP

Hi Tony,

Activecell.formulaR1C1 = "=VLOOKUP(RC1, ' " & "['" & TrendFile & "]" &
TwoMonthsAgo & " ' !C1:C[82],
82, FALSE)"


--

HTH

RP

"Tony" wrote in message
...
I am using a line of code that uses a variable to look at a set sheet and

it
works great. The "TwoMonthsAgo" variable is what I am using to look at a
sheet named "Sep04"

Activecell.formulaR1C1 = "=VLOOKUP(RC1, ' " & TwoMonthsAgo & " '

!C1:C[82],
82, FALSE)"

Now I have another variable "TrendFile" that is the name of the workbook
that the "Sep04" sheet is in. The problem I am having in setting up the
VLOOKUP function from another workbook. I would like to be in workbook-A

and
look at the "TrendFile" workbook on sheet "TwoMonthsAgo".

Thanks for any help you can give.



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
Variable file names Paul Peterson - Velox Consulting, LLC Excel Discussion (Misc queries) 8 February 4th 10 01:54 PM
variable file names Brettjg Excel Discussion (Misc queries) 2 March 2nd 07 10:56 AM
Using variable names in formula Karen M. Excel Programming 1 July 29th 04 01:07 AM
Variable names in SQL Hall Excel Programming 2 May 28th 04 11:39 PM
VLOOKUP & variable worksheet names Paul Kendall[_3_] Excel Programming 2 October 13th 03 10:39 PM


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