Thread: Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steved[_3_] Steved[_3_] is offline
external usenet poster
 
Posts: 76
Default Macro

Hello from Steved

The macro below finds " TOTAL SHIFT HOURS"
It finds the first and changes to City, then
looks for the next Range("A975").Select
and changes it to Roskill and so no until it does all 9
cities, The problem I have is that Range("A975").Select
gives a range value, next week for an example it might be
Range("A857").Select, which leads to my situation, is
their a work around so that it looks for the first
" TOTAL SHIFT HOURS" no matter where it is in Column
A as this is the only column it will find it in

Thankyou.

Cells.Find(What:=" TOTAL SHIFT HOURS",
After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlPart,
SearchOrder:=xlByColumns, SearchDirection:= _
xlNext, MatchCase:=False).Activate
ActiveCell.FormulaR1C1 = "City"
Range("A975").Select
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.FormulaR1C1 = "Roskill"
Range("A1722").Select
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.FormulaR1C1 = "Papakura"
Range("A1992").Select
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.FormulaR1C1 = "Wiri"
Range("A2679").Select