convert cells that appear to be blank to blank?

Robert Minneapolis

New Member
Joined
Aug 10, 2007
Messages
5
I had a range of cells that contained IF formulas in which the FALSE result returned "". I used 'Paste Special' to convert them to straight values, but now the 'blank' cells are being counted as nonblank in another COUNTA formula. Is there an easy way to clean this up?

EDIT: Also, is there something different I should be using in my IF formulas to produce an 'actually' blank result rather than just one that appears to be blank? For example, the way I write them now is something like

=IF(LEFT(A1,5)="PARTY","AWESOME","")

thanks in advance,
Robert
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi Robert,

You can clean the "empty" cells by selecting the entire range you want to clean and running this macro:

Code:
Sub CleanRange()
   '"Cleans" the selected range by clearing out all cells containing nothing
   'but non-printing characters including nulls and spaces
   Dim Cell    As Range
   For Each Cell In Selection
      If Not IsEmpty(Cell) Then
         Cell.Value = Trim(WorksheetFunction.Clean(Cell))
         If Cell = "" Then Cell.ClearContents
      End If
   Next Cell
End Sub

Damon
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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
Back
Top