Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Copying worksheet cells into another worksheet using autofill

I have 31 worksheets to copy into another worksheet and the cell # is the
same. What's the best formula to use to autofill?

Currently, I am getting this:
='1st'!$F$21
='1st'!$F$21
='1st'!$F$21

I need it to show this:
='1st'!$F$21
='2nd'!$F$21
='3rd!$F$21
and so on...

Any help is appreciated!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 793
Default Copying worksheet cells into another worksheet using autofill

Put the values 1st, 2nd, 3rd,... in Col G

Put the following in A1 in the sheet you want the values to be;
=INDIRECT("'"&G1&"'!$F$21")
and copy down...



"SunnySD" wrote:

I have 31 worksheets to copy into another worksheet and the cell # is the
same. What's the best formula to use to autofill?

Currently, I am getting this:
='1st'!$F$21
='1st'!$F$21
='1st'!$F$21

I need it to show this:
='1st'!$F$21
='2nd'!$F$21
='3rd!$F$21
and so on...

Any help is appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Copying worksheet cells into another worksheet using autofill

Assuming Sheet1 thru Sheet31, use something like:

=INDIRECT("Sheet" & ROW() & "!$F$21") somewhere in the first row and copy down
--
Gary''s Student - gsnu200803


"SunnySD" wrote:

I have 31 worksheets to copy into another worksheet and the cell # is the
same. What's the best formula to use to autofill?

Currently, I am getting this:
='1st'!$F$21
='1st'!$F$21
='1st'!$F$21

I need it to show this:
='1st'!$F$21
='2nd'!$F$21
='3rd!$F$21
and so on...

Any help is appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Copying worksheet cells into another worksheet using autofill

If the sheets are truly named 1st, 2nd, 3rd etc................

Add this UDF to a workbook module.

Function OrdinalNumber(ByVal Num As Long) As String
Dim N As Long
Const cSfx = "stndrdthththththth" ' 2 char suffixes

N = Num Mod 100
If ((Abs(N) = 10) And (Abs(N) <= 19)) _
Or ((Abs(N) Mod 10) = 0) Then
OrdinalNumber = Format(Num) & "th"
Else
OrdinalNumber = Format(Num) & Mid(cSfx, _
((Abs(N) Mod 10) * 2) - 1, 2)
End If

End Function


Then enter this formula in A1(or any other column in row 1) of "another
worksheet"

=INDIRECT(ordinalnumber(ROW()) & "!$F$21")

Copy down column A


Gord Dibben MS Excel MVP


On Wed, 10 Sep 2008 09:52:00 -0700, SunnySD
wrote:

I have 31 worksheets to copy into another worksheet and the cell # is the
same. What's the best formula to use to autofill?

Currently, I am getting this:
='1st'!$F$21
='1st'!$F$21
='1st'!$F$21

I need it to show this:
='1st'!$F$21
='2nd'!$F$21
='3rd!$F$21
and so on...

Any help is appreciated!


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
Copying Worksheet Cells Getting 0's lee Excel Discussion (Misc queries) 2 October 5th 06 11:28 AM
copying cells to another worksheet Lynn Excel Worksheet Functions 1 September 11th 06 02:35 PM
Copying a worksheet witrh protected cells to a new worksheet John Excel Worksheet Functions 2 February 1st 06 02:19 PM
Copying cells from 1 worksheet to another Jeffries' Ex New Users to Excel 1 August 1st 05 08:18 PM
copying cells to another worksheet Murph Excel Worksheet Functions 3 May 12th 05 02:38 PM


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