LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet names in macro

This worked when I used it on a test spreadsheet where the Tabs were
named Sheet 3, Sheet 4 and Sheet 5, but when I tried to use it on the
real file where the corresponding Tabs were named for example: North
Lane Apts, Sherri Lake Apts and Carriage House Apts, it would not
recognize the Sheet name probably because my formula is set up to call
them Sheet3, Sheet4, Sheet5. When the Macro started to run it prompted
me at every step to select the workbook and the worksheet that I wanted
to updated the values from. How can I get the Worksheet names included
in my formulas. There are many worksheets I just used 3 in my test
file.

Again what I was trying to do was to pick up information from a couple
cells from multiple worksheets and summarize it on one worksheet, with
each apartment complex having it's own line.

Here is what my macro looks like now:

Dim i As Integer, Sheet As Worksheet


Range("A1").Select
For i = 3 To Worksheets.Count Step 1
ActiveCell.FormulaR1C1 = "=Sheet" & i & "!R4C2"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=Sheet" & i & "!R3c1"
ActiveCell.Offset(1, -1).Range("A1").Select
Next i
End Sub

Thanks for any help.

 
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
Macro to create validation list of worksheet names tomhelle Excel Discussion (Misc queries) 1 March 14th 10 08:44 PM
Need Macro to Collect Multiple Worksheet Names navel151 Excel Worksheet Functions 3 February 21st 10 06:19 PM
Macro to capture worksheet names El Bee Excel Worksheet Functions 2 July 13th 06 05:56 PM
I need a macro that will insert names in an excel worksheet, the . Ocicat Excel Programming 1 November 16th 04 06:04 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


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