Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba line for clearing data from a cell
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba line for clearing data from a cell
ActiveCell.ClearContents
-- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "cvgairport" wrote: 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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba line for clearing data from a cell
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! "Luke M" wrote: ActiveCell.ClearContents -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "cvgairport" wrote: 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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba line for clearing data from a cell
Sheets("Sheet1").Range("A2, D45, C13").ClearContents
Gord Dibben MS Excel MVP On Wed, 7 Oct 2009 13:07:01 -0700, cvgairport wrote: 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! "Luke M" wrote: ActiveCell.ClearContents -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "cvgairport" wrote: 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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba line for clearing data from a cell
Range("A2,D45,C13").ClearContents. Otto
"cvgairport" wrote in message ... 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! "Luke M" wrote: ActiveCell.ClearContents -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "cvgairport" wrote: 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 |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba line for clearing data from a cell
You guys rock! Wish I could find a class to teach me these things.
Thanks! Amy "Otto Moehrbach" wrote: Range("A2,D45,C13").ClearContents. Otto "cvgairport" wrote in message ... 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! "Luke M" wrote: ActiveCell.ClearContents -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "cvgairport" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
Clearing Data | Excel Discussion (Misc queries) | |||
Clearing a cell | Excel Discussion (Misc queries) | |||
Clearing unseen data | New Users to Excel | |||
VBA Question / Clearing out All Data | Excel Worksheet Functions |