Right click sheet tab>view code>insert this.
Private Sub Worksheet_Activate()
mc = "f"
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(20, mc), Cells(lr, mc))
If c < 4500 Then
c.EntireRow.Interior.ColorIndex = 36
Else
c.EntireRow.Interior.ColorIndex = 0
End If
Next
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Kjellk" <(E-Mail Removed)> wrote in message
news:5DFBBE96-74E3-48E8-9849-(E-Mail Removed)...
> Hi and thankyou for your fast respons. I was not clear enough when writing
> my
> question. I will try to clarify:
> When I open the worksheet I want the macro automatically to identify all
> values in column F which are >4500 and colur those rows with yellow (if
> the
> macro not already have done it earlier). Mostly it will be only one row.
> The
> conditional format does what I wont but is only colouring the cell with
> the
> value. I want it extened to colour the whole row.
>
> "Mike H" skrev:
>
>> I may have misunderstood, formuultiple columns select the topmost row
>> (say
>> row 1) and drag down on the row numbers to select multiple columns then
>> proceed as in my other reply but modify the formula to
>>
>> =$F1>4500
>>
>> Mike
>>
>> "Kjellk" wrote:
>>
>> > How do I format an entire row with yellow background if the value in
>> > column F
>> > i s larger than 4500?