J
jfcby
Hello,
My worksheet has 3 columns and 493 rows of data. For example
COL 2 COL3 COL4
Row1 0840600 2219 text
Row2 0840625 1345 text
I want COL2 - COL4 bold and interior color 15 (grey) if the number in
COL2 is between 0804600-0804663.
Why am I getting this this error "Method range of global object
failed"
at this line of code "Range("cell.Address(0, 0):cell.offset(,
2).Address(0, 0)").Font.Bold = True"?
Sub FindAddData3()
'
'>> Define Variables
Dim cell As Variant
'>> Set Variables
For Each cell In Range("B4:B494") 'Change Range Reference
'
If cell.Text >= 804600 Or cell.Text <= 804663 Then
'
Range("cell.Address(0, 0):cell.offset(, 2).Address(0,
0)").Font.Bold = True
Range("cell.Address(0, 0):cell.offset(, 2).Address(0,
0)").Interior.ColorIndex = 15
Else
'Do NOTHING
End If
Next cell
End Sub
Thank you for your help,
jfcby
My worksheet has 3 columns and 493 rows of data. For example
COL 2 COL3 COL4
Row1 0840600 2219 text
Row2 0840625 1345 text
I want COL2 - COL4 bold and interior color 15 (grey) if the number in
COL2 is between 0804600-0804663.
Why am I getting this this error "Method range of global object
failed"
at this line of code "Range("cell.Address(0, 0):cell.offset(,
2).Address(0, 0)").Font.Bold = True"?
Sub FindAddData3()
'
'>> Define Variables
Dim cell As Variant
'>> Set Variables
For Each cell In Range("B4:B494") 'Change Range Reference
'
If cell.Text >= 804600 Or cell.Text <= 804663 Then
'
Range("cell.Address(0, 0):cell.offset(, 2).Address(0,
0)").Font.Bold = True
Range("cell.Address(0, 0):cell.offset(, 2).Address(0,
0)").Interior.ColorIndex = 15
Else
'Do NOTHING
End If
Next cell
End Sub
Thank you for your help,
jfcby