user21136
Active Member
- Joined
- Sep 20, 2003
- Messages
- 325
Hi,
Using Excel 2003.
I'd like to clear some cells using VBA...
These cells all have conditional formating from row 6 to 36.
In row 6, conditional format for example: Formula is =C5<>""
When I run the macro it clears the contents of C5:C35 & H5:H35 fine BUT where there are values in D5:D35 & E5:E35 it clears the conditional formating too.
Can't figure out why, any ideas please?
Regards, Glenn.
Using Excel 2003.
I'd like to clear some cells using VBA...
Code:
.Range("C5:C35").ClearContents
.Range("D5:D35").ClearContents
.Range("E5:E35").ClearContents
.Range("H5:H35").ClearContents
These cells all have conditional formating from row 6 to 36.
In row 6, conditional format for example: Formula is =C5<>""
When I run the macro it clears the contents of C5:C35 & H5:H35 fine BUT where there are values in D5:D35 & E5:E35 it clears the conditional formating too.
Can't figure out why, any ideas please?
Regards, Glenn.