LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default syntax when using a variable in a formula

hello XLers

I think I'm missing something obvious here, but I could use some help.

I have code that, among other things, pastes formulas into cells. Part of
one of the formulas is:

FormulaStr9 = "=IF(OR .... more code here ... & INDEX(Sheet23!E:E,
MATCH(A8, Sheet23!A: A .....etc

All works well, but on other sheets I keep having to Replace Sheet23 with
Sheet24, Sheet 25, etc.

Now I have a variable called SheetName, but I can't get the syntax of the
formula to work when using it. How do I use SheetName in the formula? When
SheetName = Sheet23, the formula should give the same result as the one
shown above.

Much thanks for any help
anny


 
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
syntax for variable adamaagard Excel Programming 2 January 20th 06 12:45 AM
Syntax to Set variable range Mike Fogleman Excel Programming 3 December 10th 05 09:11 PM
Syntax using variable in cell Formula Mike Fogleman Excel Programming 2 January 28th 04 12:47 AM
SaveAs syntax when using a variable Keith Excel Programming 3 November 4th 03 05:48 PM
Syntax for variable search Don Guillett[_4_] Excel Programming 0 August 6th 03 04:35 PM


All times are GMT +1. The time now is 08:20 AM.

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"