View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default column loop problem??

Dim rng as Range, cell as Range
set rng = Range(cells(1,2),Cells(rows.count,2).end(xlup))
for each cell in rng

Change the 1 in 1,2 to indicate the row you want to start in.

Or if that is what you mean - that you want to find the word Record in
column 2

Dim rng1 as Range, rng as Range, cell as Range
set rng1 = Columns(2).find("Record", Lookat:=xlPart, Lookin:=xlValues)
if not rng1 is nothing then
set rng = Range(rng1,Cells(rows.count,2).end(xlup))
for each cell in rng


--
Regards,
Tom Ogilvy


"Mike" wrote in message
...
I have a spreadsheet with 3 columns. Column 1 will have various text and
will each cell will have something in it. Column two has a header of "Use
Record", this column will have values of 1, 0 or it will be empty.

What I want to do is find Use "Record" and then work my way down the

column
and if the value = 0 then make column 1 text = "Dropped" then bold the

whole
row.

How do I do the loop since column 2 could have a blank cell and there

still
could be rows in the spreasheet?

Thanks
Mike

Col1 Use Record Col2
a 1
b 0
c
d 0
e 0
f
g 1
h