Blank out cells Macro plz help

omegadeltaphi

New Member
Joined
Jul 10, 2011
Messages
30
In my B column I have (non important) information that I want to
simply blank out not delete. The only data I want to keep is two
acronyms: WAI & ACT everything else i want to blank out

My data consists of :
3 Columns & Thousands of Rows

Any suggestions or Macro?:confused:

Thanks in advance

Steve G
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
In my B column I have (non important) information that I want to
simply blank out not delete. The only data I want to keep is two
acronyms: WAI & ACT everything else i want to blank out

My data consists of :
3 Columns & Thousands of Rows

Any suggestions or Macro?:confused:

Thanks in advance

Steve G

Not sure about blank out, but maybe? Untested try on a copy first.

Code:
Sub omegadeltaphi()
Dim x As Range
Dim y As Range
Dim lr As Long

lr = cells(rows.count,2).End(xlUp).row

Set y = Range(Range("B2"), Range("B" & lr))

For Each x In y

    If x.Value <> "WAI" Or x.Value <> "ACT" Then
    
        x.Font.ColorIndex = 2
        
    End If
    
Next x



End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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