Need Empty Cell: MACRO.......plz help

omegadeltaphi

New Member
Joined
Jul 10, 2011
Messages
30
I have a string of "xxxxxxxxxxxxxx" in Worksheet. Need to simply empty those cells entirely, don't need them. Empty not Delete the cells that contain 14 or more x's: xxxxxxxxxxxxxx

4 columns
thousands of rows

the strings of "xxxxxxxxxxxxxx" is literally 14 x's or more sometimes with information in front of and in back of like so:

tx 75228 xxxxxxxxxxxxxx 00xxxxxxxxxxxxxx
infoxxxxxxxxxxxxxx $xxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx


Steve G:confused:
thanks in advance
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Code:
Sub replaceXes()

    Columns("A:D").Replace String(14, "x"), "", xlPart

End Sub

Please provide a descriptive topic title for threads in the future. This one is clearly inadequate for all search operations.
 
Upvote 0
this did not work, and what would you have recommended i state for a descriptive title. i am not savvy in excel nor explanations or jargon so please help me with that title and what you would have named it because i will be posting more questions?

thanks,
Steve

I still need a solution for the Macro anyone????
 
Upvote 0
For instance: "Remove character x from cells"

Please post a representative sample of your data, not just typing a few lines.
Also, state the requested output in a clear way.

It would help to describe what is not working on the macro. Only saying "this did not work" will not bring us to a solution quickly.
 
Upvote 0
I think this macro will do what you want...

Code:
Sub Remove14orMoreXs()
  Columns("A:D").Replace "*xxxxxxxxxxxxxx*", "", xlWhole
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

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