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: 2,069
Default selecting columns and a loop

I have the following code with which I want to highlight new entries to my
spreadsheet. The new entries are marked "new" in column A. I am testing
some code and cannot remember/figure out how to select the range I would like
to add color too. I want to highlight the active row and select up to column
Z and fill in a color. Here is the code, which starts what I want to do but
doesn't quite bring it home...

a second question would be: Will this code work with more than one sheet if
I select a new sheet?

Sheets("c").Select
Set wks = ActiveSheet
Set rngToSearch = wks.Columns(1)

Set rngFound = rngToSearch.Find("new")
If rngFound Is Nothing Then
MsgBox "Nope"
Else
Do
rngFound.Select
???????????????????????
Range(ActiveCell, Columns.End(xlLeft)).Select ???
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With

Set rngFound = rngToSearch.FindNext
Loop Until rngFound Is Nothing
End If
End Sub
 
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
loop over columns kizzie Excel Discussion (Misc queries) 4 August 10th 05 01:31 PM
Selecting columns through a loop GreenInIowa Excel Programming 5 July 22nd 05 04:53 PM
need some help with selecting a sheet in a loop again Gary Keramidas[_2_] Excel Programming 6 July 7th 05 09:48 PM
loop through columns hotherps[_78_] Excel Programming 6 July 23rd 04 11:40 AM
Loop 20 columns Help! Michael168[_106_] Excel Programming 2 July 2nd 04 12:26 PM


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