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?
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,140
Messages
5,599,964
Members
414,352
Latest member
macquarie_jchan58

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