LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JBW JBW is offline
external usenet poster
 
Posts: 42
Default Sheet name needed for formula

I substituted the 'name' with the " & Page8.Name & _" and it wouldn't run at
all?


I have now got around problem by changing sheet name to BB SCM and then
adding date to name at the end of the macro


thanks for your assistance

James

"JE McGimpsey" wrote:

OK - I get it now - you're not asking about the *formula* changing when
the sheet name changes (which it does), you're asking how to reference
the sheet name within the macro.

Just don't hard-code the sheet name:

Range("A1").FormulaR1C1 = "=INDEX('" & Page8.Name & _
"'!C, (ROW()-1)*8+2)"

Note that you almost *never* need to select anything. Working with Range
objects directly makes your code faster, usually smaller, and IMO easier
to maintain.

In article ,
JBW wrote:

I knew I'd tried this, as soon as you change the sheet name the system opens
an explorer window and asks you to locate the new file.

code is:

Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=INDEX('BB SCM 22 OCTOBER 2007'!c, (ROW()-1)*8+2)"
date is only thing that changes.

So....


Is there a sheet reference I can use in place of the name to ensure the
correct sheet is always used?




 
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
formula needed to bring values to another sheet veena Excel Worksheet Functions 2 June 5th 07 05:58 PM
carry over data to other sheet - help needed Svea Excel Discussion (Misc queries) 3 July 17th 06 07:46 AM
Help Creating a points tracking sheet needed Kelly******** Excel Discussion (Misc queries) 0 June 23rd 06 05:35 AM
Help needed! - How do I save a filtered sheet? ROBinBRAMPTON Excel Discussion (Misc queries) 3 December 21st 05 12:29 AM
Time Sheet Calculation Help Needed! sax30 Excel Worksheet Functions 2 April 26th 05 08:08 PM


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