Concatenate with hyphens

E

Eric

I'm trying to concatenate the text strings from two cells. Both strings
include text and numbers separeated by hyphens. Cell A1 = ##-#### Cel B1 =
##-@@@@.
When I try to merge the two using =A1&" "&"B1 I get @@@@, the text string
after the hyphen in the second cell. Why is it cutting off at the hyphen and
what can I do to remedy this?

Many thanks in advance for your assistance.
 
D

Dave Peterson

Select A1
What do you see in the formula bar?

Select B1
What do you see in the formula bar?

I'm guessing that the string you see in the cell is a custom format.
 
S

smartin

Eric said:
I'm trying to concatenate the text strings from two cells. Both strings
include text and numbers separeated by hyphens. Cell A1 = ##-#### Cel B1 =
##-@@@@.
When I try to merge the two using =A1&" "&"B1 I get @@@@, the text string
after the hyphen in the second cell. Why is it cutting off at the hyphen and
what can I do to remedy this?

Many thanks in advance for your assistance.

I suspect your cells are formatted in some way that makes them appear to
contain data that is not really there. Applying a format to a cell does
not change its contents, only its appearance. Moreover, formulas such as
concatenate (&) ignore formatting.

Check the cell formatting in A1 and B1 and let us know what you find there.
 
S

Shane Devenshire

If A1 contains 451234 and is formatted as ##-#### and
B1 contains abcd and is formatted as "67-"@

you will get 451234 abcd in the concatenated cell.
 

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