Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default NEXT

This works for the first cell that has title "Shop Report", but it will not
continue to the next and to the end

Sub b10shop()


Dim MyRange As Range
Dim MyCell As Range
Dim EndRow As Integer

EndRow = Range("E65536").End(xlUp).Row
Set MyRange = Range("E1:E" & EndRow)
MyRange.Select
On Error Resume Next
For Each MyCell In MyRange
If MyCell.value = "Shop" Then
Cells.Find(What:="Shop Report", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Range("E4").Select
ActiveCell.FormulaR1C1 = "=R[3]C[-4]"
End If
Next MyCell
End Sub


--
Stacia
 
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



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