Clear Values Containing no formulas

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,652
Office Version
  1. 2019
Platform
  1. Windows
I have a spreadsheet containing text, Values as well as values with Formulas.

I need to write VBA code to clear the values where there are no formulas. The Text must be left intact, only the values containing no formulas must be cleared.

Your assistance will be most appreciated.


Howard
 

Some videos you may like

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi Howard

You can probably use the SpecialCells method:

Code:
Range("A1:H100").SpecialCells(xlCellTypeConstants,xlNumbers).ClearContents

Best regards

Richard
 

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,652
Office Version
  1. 2019
Platform
  1. Windows
Hi Richard

Thanks for the help

Regards

Howard
 

Watch MrExcel Video

Forum statistics

Threads
1,112,885
Messages
5,543,028
Members
410,583
Latest member
gazz57
Top