excel - VBA script to replace cell value and keep formatting -




i have below table in word i'm trying write script replace contents of below cell different customer payment (i.e replace £1,100 £2,000). below snippet of script when write cell loses formatting , numbered list.

how can keep replace cell data similar data , still keep formatting?

ps. i've simplified contents of cell make easier read, code won't apply content

before after

descplan = trim(t1.cell(2, 2).range.text) desctest = instr(1, descplan, ":") finalstring = left(descplan, desctest)  t1.cell(2, 2).range.text = replace(descplan, finalstring, "payment customer of " + format(v, "currency") + " due upon completion of items below:") 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -