cell formatting [newbie]

J

Jon

I would like to update the format of a cell as follows:

first letter + space + next four digits + remaining digits

Any ideas?
 
F

Fred Smith

We have lots of ideas. But first you have to tell us what's in the cell. The
best way is to give a few examples of the cell's contents and the format you
want to see.

However, formatting is for numbers. If you have text in the cell (like
"first letter"), you can't format text.

Regards,
Fred.
 
D

Dave Peterson

If those characters were all digits, you could do it.

But number formatting works with numbers.

A few choices:
1. Type the data the way you want.
2. Type the data all bunched together, but use an adjacent cell to show what
you want.
3. Use a macro to convert the value to what you want.

If you're a beginner, I'd recommend either of the first two:

The formula may look something like this if you typed the entry in A1:
=left(a1,1)&" "&mid(a1,2,4)&...

But then I'm confused by your requirements. Next four digits followed by
remaining digits sound like they should be separated by a space or just plopped
together...

Maybe one of these:
=left(a1,1)&" "&mid(a1,2,4)&" "&mid(a1,5,255)
or
=left(a1,1)&" "&mid(a1,2,255)

That 255 can be any number as long as it's bigger than the number of characters
in A1.
 
J

Jon

It's the social security number for Malta, for example my number is
something like this:

A nnnn nnnn

However there may be variants to this one, because I've seen shorter
numbers. What I know for sure is that there is a letter preceding a couple
of numbers:

A nnn...


where A is a character from A-Z and n is a number. n.. means that the
number of numeric characters is not known.

Hence, for now I'm assuming that if I divide the digit into chunks of
numbers which may be up to 4 characters each.
 

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