Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Help Deleting

I need a quick macro that will help me delete all cells in Column A tha
have a # in it and in Column C I need all the cells that have the wor
NAME in it to be deleted...

Also, one more thing, in columb B i have customer numbers that star
with the Letter B and have a 1 or 2 or 3 digit number proceeding it (i
B123, B2, B30, etc...) is there a way I can find all instances of B..
and have it automatically deleted

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need Help Deleting

Bob already gave you the basic code to do it. You just need to adapt it.

Sub AAA()
Dim oFound As Range
Dim firstaddress

varr = Array("B*", "*#*", "*name*")
For i = LBound(varr) To UBound(varr)
firstaddress = ""
Set oFound = Cells.Find(varr(i), _
LookIn:=xlValues, LookAt:=xlWhole)
If Not oFound Is Nothing Then
firstaddress = oFound.Address
Do
'oFound.Delete Shift:=xlShiftUp
oFound.ClearContents
Set oFound = Cells.FindNext(oFound)
Loop While Not oFound Is Nothing
End If
Next

End Sub

--
Regards,
Tom Ogilvy


"alexm999 " wrote in message
...
I need a quick macro that will help me delete all cells in Column A that
have a # in it and in Column C I need all the cells that have the word
NAME in it to be deleted...

Also, one more thing, in columb B i have customer numbers that start
with the Letter B and have a 1 or 2 or 3 digit number proceeding it (ie
B123, B2, B30, etc...) is there a way I can find all instances of B...
and have it automatically deleted?


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting the text without deleting the formula gems04 Excel Worksheet Functions 3 January 30th 09 11:21 PM
Deleting cell data without deleting formula Tom Hall Excel Discussion (Misc queries) 4 October 29th 06 04:07 PM
deleting values in a worksheet without deleting the formulas patti Excel Worksheet Functions 1 October 28th 05 09:49 PM
how prevent formula in cell from deleting when deleting value???? sh-boom New Users to Excel 1 September 30th 05 06:12 PM
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content rmaloy Excel Programming 5 February 9th 04 01:59 AM


All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"