Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Colour row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kjellk - 26 Mar 2008 11:34 GMT
How do I format an entire row with yellow background if the value in column F
i s larger than 4500?
Mike H - 26 Mar 2008 11:50 GMT
Hi,

Select the row then

Format|conditional format
Formula us
=$F$1>4500
Select a colour
Click OK

Mike

> How do I format an entire row with yellow background if the value in column F
> i s larger than 4500?
Mike H - 26 Mar 2008 12:05 GMT
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

> How do I format an entire row with yellow background if the value in column F
> i s larger than 4500?
Kjellk - 26 Mar 2008 13:11 GMT
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
[quoted text clipped - 6 lines]
> > How do I format an entire row with yellow background if the value in column F
> > i s larger than 4500?
Don Guillett - 26 Mar 2008 13:57 GMT
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

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> Hi and thankyou for your fast respons. I was not clear enough when writing
> my
[quoted text clipped - 22 lines]
>> > column F
>> > i s larger than 4500?
Nigel - 26 Mar 2008 14:07 GMT
Please the following in "ThisWorkBook" code sheet

Private Sub Workbook_Open()
Dim xR As Long
With Sheets("Sheet1")
For xR = 1 To .Cells(.Rows.Count, "F").End(xlUp).Row
If .Cells(xR, "F") > 4500 Then
 .Rows(xR).EntireRow.Interior.Color = vbYellow
End If
Next
End With
End Sub

Signature

Regards,
Nigel
nigelnospam@9sw.co.uk

> Hi and thankyou for your fast respons. I was not clear enough when writing
> my
[quoted text clipped - 22 lines]
>> > column F
>> > i s larger than 4500?
Kjellk - 26 Mar 2008 17:29 GMT
Thanks gentlemen .Now you have  solved one BIG problem for me.
Regards
Kjell

"Nigel" skrev:

> Please the following in "ThisWorkBook" code sheet
>
[quoted text clipped - 35 lines]
> >> > column F
> >> > i s larger than 4500?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.