Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using a Varible inside of a proper address

Top of the morning

Assume the following:
LogSheet being a definied string variable
LogSheet has the value of 'Feb' assinged to it

It is used in the following line of code

ActiveWorkbook.Names.Add Name:="count",
RefersToR1C1:="=LogSheet!R8C7"

The code runs

I want Feb!r8c7.....I get LogSheetr8c7

Thanks in advance for any help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Using a Varible inside of a proper address

Try this
ActiveWorkbook.Names.Add Name:="count",
RefersToR1C1:="=" & LogSheet & "!R8C7"

If this does not work you may have to sent the string to a variable first
x= "=" & LogSheet & "!R8C7"
then
ActiveWorkbook.Names.Add Name:="count",
RefersToR1C1:= x

TerryK
  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Using a Varible inside of a proper address

Thanks for the solution....worked liked a charm

-----Original Message-----
Try this
ActiveWorkbook.Names.Add Name:="count",
RefersToR1C1:="=" & LogSheet & "!R8C7"

If this does not work you may have to sent the string to

a variable first
x= "=" & LogSheet & "!R8C7"
then
ActiveWorkbook.Names.Add Name:="count",
RefersToR1C1:= x

TerryK
.

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
Why won't ADDRESS work nested inside SUMIF? Beric Dondarrion Excel Discussion (Misc queries) 2 December 29th 09 03:14 PM
INDIRECT(ADDRESS) inside a VLOOKUP JG Excel Worksheet Functions 13 April 22nd 09 08:33 PM
varible table not spxer Excel Worksheet Functions 3 August 4th 06 05:13 PM
varible table spxer Excel Worksheet Functions 1 August 3rd 06 08:30 PM
Indirect address inside "" Khoshravan Setting up and Configuration of Excel 2 June 26th 06 12:31 AM


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