Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default excel command to clear contents except 2 formulas

I have an excel database that when being accessed each time l need to clear
the contents of the previous record. I have created a macro through VBA to
clear my drop down and option boxes. Does anyone know of the command that
will clear my text fields of information. The gotcha here is l have a
formula in cells c7 and c22 that l don't want whipped out. One is an age
calculator formula and the other one is a hours/minute formula calculation.
I know l can type the range with clear contents in the command. I am unsure
how you eliminate c7, c22 from that command.

Any help would be greatly appreciated

Lynda S
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default excel command to clear contents except 2 formulas


Can't you clear several ranges that surround your static cells as an
alternative?


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=560440

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default excel command to clear contents except 2 formulas

Lynda

Sub clearout()
Set rng1 = Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues)
rng1.ClearContents
End Sub


Gord Dibben MS Excel MVP

On Tue, 11 Jul 2006 12:55:02 -0700, Lynda S
wrote:

I have an excel database that when being accessed each time l need to clear
the contents of the previous record. I have created a macro through VBA to
clear my drop down and option boxes. Does anyone know of the command that
will clear my text fields of information. The gotcha here is l have a
formula in cells c7 and c22 that l don't want whipped out. One is an age
calculator formula and the other one is a hours/minute formula calculation.
I know l can type the range with clear contents in the command. I am unsure
how you eliminate c7, c22 from that command.

Any help would be greatly appreciated

Lynda S


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default excel command to clear contents except 2 formulas

Thank you for your reply. I didn't think about that scenario. I just need
to think how l will type in the groupings

Lynda

"mrice" wrote:


Can't you clear several ranges that surround your static cells as an
alternative?


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=560440




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default excel command to clear contents except 2 formulas

Thank you for your reply. I will play with this and see

Lynda

"Gord Dibben" wrote:

Lynda

Sub clearout()
Set rng1 = Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues)
rng1.ClearContents
End Sub


Gord Dibben MS Excel MVP

On Tue, 11 Jul 2006 12:55:02 -0700, Lynda S
wrote:

I have an excel database that when being accessed each time l need to clear
the contents of the previous record. I have created a macro through VBA to
clear my drop down and option boxes. Does anyone know of the command that
will clear my text fields of information. The gotcha here is l have a
formula in cells c7 and c22 that l don't want whipped out. One is an age
calculator formula and the other one is a hours/minute formula calculation.
I know l can type the range with clear contents in the command. I am unsure
how you eliminate c7, c22 from that command.

Any help would be greatly appreciated

Lynda S



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
Excel 2002; copy formulas to one workbook to another diff data SinnetBS Excel Worksheet Functions 1 November 25th 05 08:31 PM
How do I clear data values wthout losing the formulas? genaksdal Excel Worksheet Functions 1 November 8th 05 05:48 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel formulas and recalculation Peter Excel Discussion (Misc queries) 3 June 8th 05 10:17 PM
Provide a way to turn off auto-checking excel formulas as I type t ikarius_rb Excel Discussion (Misc queries) 6 March 23rd 05 12:33 PM


All times are GMT +1. The time now is 06:34 AM.

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

About Us

"It's about Microsoft Excel"