Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to create sequence of numbers

Hi

I need a macro to count down column A until I reach 'Finish',
then I want to select cells E1:E'Finish' and autofill to F1:F'Finish'

Any ideas??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Macro to create sequence of numbers

This isn't as clean as I'd like it to be, but it'll do what you want

Sub Macro1()
'
Dim myRange As Range

Set myRange = Nothing
On Error Resume Next
Set myRange = Columns("A:A").Find(What:="Finish", _
After:=Cells(1, 1), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)
On Error GoTo 0
If Not myRange Is Nothing Then
Range("F1:F" & myRange.Row).FillRight
Else
MsgBox ("Finish Not Found")
End If

End Sub

--
HTH,
Barb Reinhardt



" wrote:

Hi

I need a macro to count down column A until I reach 'Finish',
then I want to select cells E1:E'Finish' and autofill to F1:F'Finish'

Any ideas??

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
sequence numbers Natalie B Excel Discussion (Misc queries) 3 October 17th 07 09:50 PM
sequence of numbers andrewm Excel Worksheet Functions 3 November 13th 05 06:20 PM
sequence numbers Ashley Excel Discussion (Misc queries) 1 July 22nd 05 02:32 PM
sequence numbers su su Excel Discussion (Misc queries) 4 May 12th 05 02:51 AM
how do I sequence numbers EL GUAPO Excel Discussion (Misc queries) 2 January 28th 05 09:45 PM


All times are GMT +1. The time now is 03:37 AM.

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"