Dear Glenn,

Please try it with Offset.......

*Sub test()
Dim cell As Range
For Each cell In Sheet1.Range("A1:A" & Sheet1.Range("A65536").End(xlUp).Row)
If cell.Value = 0 Then
cell.Offset(-2, 0).Font.Bold = True
End If
Next cell
End Sub
*

-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/>
*http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/>
On Sat, Oct 29, 2011 at 4:30 AM, Hayhurst, Glenn A <
glenn.a.hayhu...@lmco.com> wrote:

>  Hi. I am trying to find cells in Column A with a value of “0” and then
> navigating up two rows and making that entire row bold.  It all falls apart
> after I try to use Offset.  Where did I go wrong?****
>
> ** **
>
> Sub BOLDAboveZero()****
>
> Dim LR As Long, i As Long****
>
> LR = Range("A" & Rows.Count).End(xlUp).Row****
>
> For i = LR To 1 Step -1****
>
>     With Range("A" & i)****
>
>         If .Value = 0 Then .ActiveCell.Offset(-2, 0).Select****
>
> Select.EntireRow.Font.Bold=True
>     End With****
>
> Next i****
>
> End Sub****
>
> ** **
>
> ** **
>
> --
> FORUM RULES (925+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
> not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (925+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to