Find/Replace changes cell format ??????


W

Woland99

I have a column in spreadsheet containing codes - they are 4-digit
numbers
some of them contain leading zeros. So column is formatted as Text to
preserve
those leading zeros. I want to mark some of those codes by adding
extra prefix -
eg. '0041' changes to 'xx0042'. But when I try to remove to remove
that extra string
later by Find/Replace Excel reformats the cell to remove leading
zeros: xx0042
changes to 42. How can I prevent that?

TIA for any pointers,

JT
 
Ad

Advertisements

P

Pete_UK

Highlight the cells, CTRL-H, then:

Find What: xx
Replace with: ' (i.e. apostrophe)
Replace All.

Hope this helps.

Pete
 
Ad

Advertisements

M

Mike H

I assume you are manually applying the prefix so you have 2 choices:-

1. When applying the pefix don't delete the ' sign. It will be visible in
the cell though. When you do a replace xx with nothing and the leading zeroes
will be retained.

2. If having the ' visible is an issue then delete it, apply your prefix and
when you replace try replacing xx with '

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top