vba line for clearing data from a cell

C

cvgairport

Hi all -

Is there a line of vba code that I could put into a startup macro to empty a
cell of data. I want to keep the formatting and any cell comments.

Thanks!

Amy
 
C

cvgairport

Awesome, but what if the user is not on the cell. I'd like to give the macro
a couple of cell locations to clear such as A2 and D45 and C13.

Thanks!
 
G

Gord Dibben

Sheets("Sheet1").Range("A2, D45, C13").ClearContents


Gord Dibben MS Excel MVP
 
O

Otto Moehrbach

Range("A2,D45,C13").ClearContents. Otto
cvgairport said:
Awesome, but what if the user is not on the cell. I'd like to give the
macro
a couple of cell locations to clear such as A2 and D45 and C13.

Thanks!
 
C

cvgairport

You guys rock! Wish I could find a class to teach me these things.

Thanks!

Amy
 
Top