LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Can't get the macro to continue through a range

I am having trouble with getting this to pass through the range of
"DataWithOnes". Not sure how to do this, can anyone see why?

Thx in advance



Sub Data_With_Ones()

Set DataWithOnes = Range("E3:AU200")
For Each c In DataWithOnes

If c.Value 0 Then


Cells.Find(What:="1", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:
= _
False, SearchFormat:=False).Activate
Set topcell = ActiveCell

Cells.Find(What:="2", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:
= _
False, SearchFormat:=False).Activate
Set bottomcell = ActiveCell

If topcell = 1 Then Set topcell = topcell

Range(topcell, bottomcell).Select
Selection.FillDown
bottomcell.Select

Else:
End If

Next


End Sub

--
Message posted via http://www.officekb.com

 
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
macro to scroll the worksheet and continue to run macro in backgro Micah Excel Programming 2 October 1st 07 05:10 PM
How to continue macro if there is an error value msdrolf Excel Programming 1 November 2nd 06 07:23 PM
VB code to continue macro Brian Excel Discussion (Misc queries) 3 May 9th 06 03:12 AM
VBA codes for macro to continue Brian Excel Programming 11 May 23rd 05 11:33 PM
The way to continue do macro recording Susan Soo[_2_] Excel Programming 2 February 16th 05 03:21 PM


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