Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sequence numbers | Excel Discussion (Misc queries) | |||
sequence of numbers | Excel Worksheet Functions | |||
sequence numbers | Excel Discussion (Misc queries) | |||
sequence numbers | Excel Discussion (Misc queries) | |||
how do I sequence numbers | Excel Discussion (Misc queries) |