Delete Cell value if it contains any text in Excel

oldb

New Member
Joined
Mar 17, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need to delete cell values if they contain any text on multiple spreadsheets (but not all, every sheet after the 5th one).
Range would be E3 to GW16 on every sheet.

Is there an easy way to do this?
Thanks for your help
 
Re: "if they contain any text"
What is considered any text?

1234abcd567
or
abcdef
or
ghij klmn 987
or
1234 formatted as text
good question... now that I think about it, it may be better if it would just show in which cell on what sheet text is, so not deleting it but only tell me where it is. In this case any of those except the last one would be nice to know.
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
it may be better if it would just show in which cell on what sheet text is,
This would highlight them yellow instead of deleting

VBA Code:
Sub Highlight_Text_Values()
  Dim i As Long
  
  On Error Resume Next
  For i = 6 To Sheets.Count
    Sheets(i).Range("E3:GW16").SpecialCells(xlCellTypeConstants, xlTextValues).Interior.Color = vbYellow
  Next i
  On Error GoTo 0
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,418
Messages
6,124,793
Members
449,189
Latest member
kristinh

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