formula, or macro

schwabl

New Member
Joined
Oct 6, 2002
Messages
10
is there a formula, or a macro that will clear certain ranges in a spreadsheet without eliminating the formulas already in place? if i protect the worksheet will it keep the formulas and allow the data to be cleared?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Juan Pablo González

MrExcel MVP
Joined
Feb 8, 2002
Messages
11,959
Do you want to eliminate the cells that don't contain formulas ? then, you can record a macro like this:

Select all cells (Or the range that you want)
Press F5
Click on "Special"
Select "Constants" (You can restrict this to only numbers, text, errors or logical values)
Click Ok
Press "Del", or go to Edit | Clear Contents

Stop the macro.
 

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
No, all formulas return values. Once a formula is entered into a cell it will return a value 'til it has been eliminated.

Of course, in theory you could incorporate a "switch" in all your formulas that would cause it to return an empty string, "".

=IF(A1=something,"",[your formula here])

...but, I wouldn't recommend this.
This message was edited by Mark W. on 2002-10-17 18:18
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,036
Messages
5,856,957
Members
431,841
Latest member
jaybeem

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top