Like several others, this is the first time I’ve tried creating a macro. I’ve solved several problems that have popped up, but now I’m stuck. I’m trying to get the macro to find every row where column A has text and column B is empty. Whenever that occurs (should be a total of four times), the entire row has to have a border at the top, needs to be highlighted in blue, and the font is bold.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I’m fairly confident this should be accomplished with an “IF” macro, but I just haven’t been able to figure it out.
<o> </o>
I think the macro should st<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-comffice:smarttags" /><st1:PersonName w:st="on">art</st1:PersonName> out with something like this:
<o> </o>
Range("A1").Select
If Range(“A1”) = “xxx” And (“B1” = "") Then
<o> </o>
Using Excel 2003, I ran the macro based on a specific row (see below), but that won’t be an option for the actual report.
<o> </o>
Sub DesignRow()<o></o>
'
' DesignRow Macro
<o> </o>
'
Rows("12:12").Select
With Selection.Interior
.ColorIndex = 33
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDot
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
End With
End Sub
<o> </o>
<o> </o>
Thanks in advance for any and all help.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
I’m fairly confident this should be accomplished with an “IF” macro, but I just haven’t been able to figure it out.
<o> </o>
I think the macro should st<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-comffice:smarttags" /><st1:PersonName w:st="on">art</st1:PersonName> out with something like this:
<o> </o>
Range("A1").Select
If Range(“A1”) = “xxx” And (“B1” = "") Then
<o> </o>
Using Excel 2003, I ran the macro based on a specific row (see below), but that won’t be an option for the actual report.
<o> </o>
Sub DesignRow()<o></o>
'
' DesignRow Macro
<o> </o>
'
Rows("12:12").Select
With Selection.Interior
.ColorIndex = 33
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlDot
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
End With
End Sub
<o> </o>
<o> </o>
Thanks in advance for any and all help.