Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Excel formula

I have an excel workbook with several sheets. All of the
sheets are a copy of the first one. I have a formula that
contains the sheetname and I need this formula on all
sheets. Is there a way to copy this formula down so that
the formula stays the same, but it changes sheet1 to
sheet2 in the second cell, sheet3 in the third, and so on?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Excel formula

I can tell you how I solved that problem, but you have to
write a Visual Basic Macro to do it.
First, you can create a new macro called "SheetName" for
use in the futu

Function SheetName() as String
SheetName = Range("A1").Parent.Name
End Function

then in your processing formula substitute "SheetName()"
(without quotes) wherever you normally have the sheetname.
The macro SheetName will return the value of the currently
active sheet name.




-----Original Message-----
I have an excel workbook with several sheets. All of the
sheets are a copy of the first one. I have a formula that
contains the sheetname and I need this formula on all
sheets. Is there a way to copy this formula down so that
the formula stays the same, but it changes sheet1 to
sheet2 in the second cell, sheet3 in the third, and so on?
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Excel formula

Michael

=INDIRECT("Sheet" & (ROW()) & "!A1")

A1 will be your choice of cellref.

Gord Dibben Excel MVP


On Tue, 6 Jul 2004 12:40:47 -0700, "MICHAEL"
wrote:

I have an excel workbook with several sheets. All of the
sheets are a copy of the first one. I have a formula that
contains the sheetname and I need this formula on all
sheets. Is there a way to copy this formula down so that
the formula stays the same, but it changes sheet1 to
sheet2 in the second cell, sheet3 in the third, and so on?


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
Excel formula to copy/paste formula needed please. colwyn Excel Discussion (Misc queries) 4 October 22nd 08 11:27 PM
Excel 2002 Formula: Urgent Conditional Formula Required Right Away - if possible blue[_2_] Excel Discussion (Misc queries) 2 July 11th 07 06:08 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
match formula - 2 excel files:#1 hasthis formula, 2nd has the Raw DS Excel Worksheet Functions 4 October 7th 06 12:25 AM
Excel 2002 formula displayed not value formula option not checked Dean Excel Worksheet Functions 1 February 28th 06 02:31 PM


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