Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm working with Columns H & I in Range from rows 11 to 180.
How would I write this code below in lieu of writing out each line of its range:
For example, how would I shorten its length of my proposed code in lieu of writing out each and every line until row 180?
Please let me know when you get a chance.
Thanks!
pinaceous
I'm working with Columns H & I in Range from rows 11 to 180.
How would I write this code below in lieu of writing out each line of its range:
VBA Code:
If Range("H11") = "Enter Tally" And Range("I11") = "" Then
Range("H11").ClearContents
End If
If Range("H12") = "Enter Tally" And Range("I12") = "" Then
Range("H12").ClearContents
End If
If Range("H13") = "Enter Tally" And Range("I13") = "" Then
Range("H13").ClearContents
End If
.
.
.
If Range("H180") = "Enter Tally" And Range("I180") = "" Then
Range("H180").ClearContents
End If
For example, how would I shorten its length of my proposed code in lieu of writing out each and every line until row 180?
Please let me know when you get a chance.
Thanks!
pinaceous