Delete characters in a cell


i want remove following charaters of cells in column "a":

- "*"

- "@"

- "#"

after removed, want trim of cells in column "a".

thank you.

i found following works:

dim cel range
    application.screenupdating = false
    range("a:a")
        .replace what:="~*", replacement:="", lookat:=xlpart
        .replace what:="@", replacement:="", lookat:=xlpart
        .replace what:="#", replacement:="", lookat:=xlpart
        each cel in .specialcells(xlcelltypeconstants)
            cel.value = trim(cel.value)
        next cel
    end with
    application.screenupdating = true

thank time.



Learning  >  Small Basic



Comments

Popular posts from this blog

Motherboard replacement

Remote Desktop App - Error 0x207 or 0x607

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state