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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -