Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,071
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
Clearing Data Troy2006 Excel Discussion (Misc queries) 3 October 31st 08 10:01 PM
Clearing a cell basil Excel Discussion (Misc queries) 4 April 30th 07 11:28 AM
Clearing unseen data Ralphael1 New Users to Excel 3 December 2nd 05 11:25 AM
VBA Question / Clearing out All Data carl Excel Worksheet Functions 3 March 2nd 05 07:57 PM


All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"