excel - VBA Cells.Replace() -
setup
i'm using vba in excel 2012
question
i need search through sheet , replace "#"s. in first column. second cells.replace not work. assume because "# # #" doesn't type of string.
current code
'find , replace "#" "" cells.replace what:="###", replacement:="", lookat:=xlpart, searchorder:= _ xlbyrows, matchcase:=false, searchformat:=false, replaceformat:=false cells.replace what:="# # #", replacement:="", lookat:=xlpart, searchorder:= _ xlbyrows, matchcase:=false, searchformat:=false, replaceformat:=false
any thing would.
to erase combination of #
cells.replace "#", "", xlpart
** erase ### or ## # # or # # #**
cells.replace "###", "", xlpart cells.replace "## # #", "", xlpart cells.replace "# # #", "", xlpart
edit: comment explains need remove ### or ## # # or # # #.
Comments
Post a Comment