Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default looping from one column to the next

it's a simple macro that i've created, because I'm still a newbie at all of
this.

basically, the macro goes down each cell in a column, and if the cell's
value is greater than 300, then it puts in a background color into the cell.
the macro stops when the cell has nothing in it (the end of the column). I'd
like it to jump to the next column and repeat the macro, but not sure how to
do it. Here's what I've got so far:

Sub testcolors()
ActiveCell.Select
Do Until ActiveCell = ""
If ActiveCell = "" Then End
ActiveCell.Select
If ActiveCell 300 Then
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End If
ActiveCell.Offset(1,0).Activate
Loop
End Sub

Any help is greatly appreciated. Thanks.
Brad


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
Looping Maggie[_6_] Excel Discussion (Misc queries) 6 October 2nd 08 09:14 PM
Not Looping Roger Excel Discussion (Misc queries) 0 February 26th 08 05:18 PM
count rows in a column for looping damorrison Excel Discussion (Misc queries) 2 April 8th 07 10:30 PM
Looping David T Excel Discussion (Misc queries) 2 August 30th 06 10:51 PM
Looping until empty column theguz Excel Discussion (Misc queries) 1 August 4th 05 07:04 PM


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