Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting values not formulas
Hi All,
I'm looking for a way to delete cells with values but without formulas in it? (VBA) in office 2003. Thanks a lot in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting values not formulas
Hi
For Each c In Selection.Cells If Not c.HasFormula Then c.ClearContents Next c HTH Cordially Pascal "Lp12" a écrit dans le message de news: ... Hi All, I'm looking for a way to delete cells with values but without formulas in it? (VBA) in office 2003. Thanks a lot in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting values not formulas
Thanks a lot papou.
Thats what I was looking for. How could I forget .Hasformula!!!! "papou" wrote: Hi For Each c In Selection.Cells If Not c.HasFormula Then c.ClearContents Next c HTH Cordially Pascal "Lp12" a écrit dans le message de news: ... Hi All, I'm looking for a way to delete cells with values but without formulas in it? (VBA) in office 2003. Thanks a lot in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting values not formulas
Another way to get them all at once:
Select the range to fix Edit|Goto special|Constants click ok hit the delete key on the keyboard. In code: On error resume next Selection.Cells.SpecialCells(xlTextValues).ClearCo ntents on error goto 0 You could specify a more exact range, too: Activesheet.range("a1:c99").Cells.SpecialCells(xlT extValues).ClearContents Lp12 wrote: Hi All, I'm looking for a way to delete cells with values but without formulas in it? (VBA) in office 2003. Thanks a lot in advance -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting values not formulas
Thanks Dave.
This is even more elegant!!! "Dave Peterson" wrote: Another way to get them all at once: Select the range to fix Edit|Goto special|Constants click ok hit the delete key on the keyboard. In code: On error resume next Selection.Cells.SpecialCells(xlTextValues).ClearCo ntents on error goto 0 You could specify a more exact range, too: Activesheet.range("a1:c99").Cells.SpecialCells(xlT extValues).ClearContents Lp12 wrote: Hi All, I'm looking for a way to delete cells with values but without formulas in it? (VBA) in office 2003. Thanks a lot in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting lines that use them for formulas | Excel Discussion (Misc queries) | |||
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP | Excel Worksheet Functions | |||
deleting values in a worksheet without deleting the formulas | Excel Worksheet Functions | |||
Excel is Deleting My Formulas?? | Excel Discussion (Misc queries) | |||
delete values in several cells without deleting the formulas | Excel Discussion (Misc queries) |