Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save the formulas when running a macro? Need ASAP!!
I have a simple question...is there a way, via code, to only clear the
contents of a defined range of cells and allow the rest of the worksheet to remain untouched? Seems simple, but I'm new to macros. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save the formulas when running a macro? Need ASAP!!
Here is an example of clearing a defined range:
Sub clear_part() Dim r As Range Set r = Range("A1:C5") r.Clear End Sub -- Gary's Student "MLP" wrote: I have a simple question...is there a way, via code, to only clear the contents of a defined range of cells and allow the rest of the worksheet to remain untouched? Seems simple, but I'm new to macros. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I save the formulas when running a macro? Need ASAP!!
If you need to keep formulae and clear only data:
Sub clear_part2() Dim r As Range Set r = Range("A1:C5").SpecialCells(xlCellTypeConstants) r.Clear End Sub -- Gary's Student "MLP" wrote: I have a simple question...is there a way, via code, to only clear the contents of a defined range of cells and allow the rest of the worksheet to remain untouched? Seems simple, but I'm new to macros. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
Save a Macro | Excel Discussion (Misc queries) | |||
macro save a workbook whilst increasing file no | Excel Worksheet Functions | |||
Creating a macro to save only partial data | Excel Discussion (Misc queries) | |||
Macro to save a file as | Excel Discussion (Misc queries) |