Find rows with a value in column A and change font size and shade

simmonsv

Board Regular
Joined
Sep 27, 2012
Messages
58
I need to find the rows with a PO# and format cells A:H to size 11 and shade a light grey.
Thank you so much for any help on this project.

[TABLE="width: 625"]
<TBODY>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]PO Number</SPAN>[/TD]
[TD]Line</SPAN>[/TD]
[TD]Material</SPAN>[/TD]
[TD]Vendor</SPAN>[/TD]
[TD]Vendor Name & Material Description</SPAN>[/TD]
[TD]Buyer</SPAN>[/TD]
[TD]Order Date</SPAN>[/TD]
[TD]Due Date</SPAN>[/TD]
[TD]Priority</SPAN>[/TD]
[/TR]
[TR]
[TD]4500513917</SPAN>[/TD]
[TD] [/TD]
[TD]NB</SPAN>[/TD]
[TD]101135</SPAN>[/TD]
[TD]PACTIV CORP</SPAN>[/TD]
[TD]73</SPAN>[/TD]
[TD]07/22/13</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]40</SPAN>[/TD]
[TD]690502</SPAN>[/TD]
[TD] [/TD]
[TD]TH10500 5 COMP FOAM TRAY</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]50</SPAN>[/TD]
[TD]690502</SPAN>[/TD]
[TD] [/TD]
[TD]TH10500 5 COMP FOAM TRAY</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]60</SPAN>[/TD]
[TD]690502</SPAN>[/TD]
[TD] [/TD]
[TD]TH10500 5 COMP FOAM TRAY</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4500515158</SPAN>[/TD]
[TD] [/TD]
[TD]NB</SPAN>[/TD]
[TD]100771</SPAN>[/TD]
[TD]ITW ANGLEBOARD</SPAN>[/TD]
[TD]4</SPAN>[/TD]
[TD]07/30/13</SPAN>[/TD]
[TD]08/12/13</SPAN>[/TD]
[TD] P3</SPAN>[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]30</SPAN>[/TD]
[TD]10036121</SPAN>[/TD]
[TD] [/TD]
[TD]2-1/2"X2-1/2"X54".225 ANGLEBOARD</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4500515295</SPAN>[/TD]
[TD] [/TD]
[TD]NB</SPAN>[/TD]
[TD]103679</SPAN>[/TD]
[TD]AGS FOOTWEAR</SPAN>[/TD]
[TD]48</SPAN>[/TD]
[TD]07/30/13</SPAN>[/TD]
[TD]08/06/13</SPAN>[/TD]
[TD] P1</SPAN>[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]70</SPAN>[/TD]
[TD]10049386</SPAN>[/TD]
[TD] [/TD]
[TD]SH182 WOMENS MED SHOE STRETCHER</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4500515403</SPAN>[/TD]
[TD] [/TD]
[TD]NB</SPAN>[/TD]
[TD]103354</SPAN>[/TD]
[TD]MULLENBOX</SPAN>[/TD]
[TD]19</SPAN>[/TD]
[TD]07/31/13</SPAN>[/TD]
[TD]08/08/13</SPAN>[/TD]
[TD] P1</SPAN>[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL><COL><COL><COL><COL><COL><COL></COLGROUP>[/TABLE]
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
I am curious as to why you are excluding the Priority in the selection, but this should work for you...

Code:
Sub HighLite()

Dim rngCell As Range
Dim lngLstRow As Long

lngLstRow = ActiveSheet.UsedRange.Rows.Count

For Each rngCell In Range("A2:A" & lngLstRow)
    If rngCell.Value > 0 Then
' If you want to include Column I, change the 7 to 8
        Range(rngCell, rngCell.Offset(0, 7)).Select
            With Selection.Font
            .Size = 12
            .Bold = True
            Selection.Interior.ColorIndex = 15
            End With
    End If
Next
End Sub
 
Upvote 0
The code worked perfectly. I had some code but was using Cell instead of range. Also, I am changing the colors in column I based on the P value. I did, however, go ahead and make it grey first, then just did a conditional format on that one column.

Can't thank you enough for all your help, it has saved me a bunch of frustration!!
 
Upvote 0

Forum statistics

Threads
1,223,921
Messages
6,175,379
Members
452,639
Latest member
RMH2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top