Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tc tc is offline
external usenet poster
 
Posts: 40
Default Using stored variable in a formula

Hi. i have managed to store the active sheet name in a variable. how
do i use this variable in a formula?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Using stored variable in a formula

Here is what the formula look like in the spreadsheet

=SUM(Sheet2!A1:A5)

To generate this in VBA

MySheetName = "Sheet2"

Range("A1").formula = "=SUM(" & MySheetName & "!A1:A5)"

"tc" wrote:

Hi. i have managed to store the active sheet name in a variable. how
do i use this variable in a formula?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Using stored variable in a formula

What formula?



In article .com,
tc wrote:

Hi. i have managed to store the active sheet name in a variable. how
do i use this variable in a formula?

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
Converting a Formula stored as String to real Formula BlueD Excel Worksheet Functions 3 January 14th 08 07:48 PM
Using value stored in cell in formula Philip Gabe Excel Worksheet Functions 1 March 30th 07 09:55 PM
formula containing a formula-dependent variable - how? CompeterN New Users to Excel 1 November 8th 06 02:02 PM
Run macro from name stored in variable? chubster264 Excel Programming 5 January 5th 06 09:55 PM
variable stored in Excel - read only from VBA Robert Mooney Excel Programming 3 June 22nd 04 02:49 AM


All times are GMT +1. The time now is 01:15 AM.

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"