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: 1
Default Find value loop not working

Hi.

This loop is driving me nuts.

I want to search in a range ("A1:U50") to find cells containing th
word "totals" (there is other text in the cell);

when I find such a cell, I want to apply certain formatting to a cel
below it (this part I am ok with).

WHen it finds all the cells, I want the loop to end, but it doesn'
stop!

My code

Sub FormatMonths ()

With worksheets("unit forecast").range("A1:U50")


chktot=cells.find(what:="*totals*").activate

Do while chcktot=true
activecell.offset(1,0).range("a1").select
Selection.font.colorindex=3

cells.find(what:="*totals*").activate

Loop

End With

End Sub


Please help if you can.
CHristiane



:confused

--
Message posted from http://www.ExcelForum.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
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Loop all Sheets not working. Pank New Users to Excel 12 February 27th 07 11:55 AM
On Error GoTo Label in a loop only working once. Ken Johnson Charts and Charting in Excel 4 July 5th 06 09:39 PM
Find & loop in VBA Noemi Excel Discussion (Misc queries) 3 January 25th 06 03:39 AM
Loop - for each sheet not working? Shetty Excel Programming 6 January 15th 04 02:22 PM


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