Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sunslight
 
Posts: n/a
Default Concantenate Text with numbers with fixed form

I am trying to concantenate something like this:
A B C
1 dog100 0001 red
2 0002
3 0003

I have fields A,C set as Text; field B set as custom "0000"
When I enter all the data, field B shows the beginning zeros: "0000, 0001,
etc." as it should.

If I construct a formula to increment column B by one: Sum(B1,B2) or
"B1+B2" and copy it down the column." The results are correct: 0001, 0002,
0003, etc.

The concantenation I want is thus:
"dog1000001red"
"dog1000002red"
"dog1000003red"

By using absolute references for $A$1, $C$1, and the normal referal
reference for B2 (sum), it does increment by one, but I loose the beginning
zeros:
"dog1001red, dog1002red, dog1003red."

I thought since column A has numbers in it and it's reading as text, maybe
it needs to be set to custom, 0000 instead, (which really doesn't make any
sense, but I did it anyway) and there was no change.

I don't know how to keep the beginning zeros when concantenating text (or
general) + a formated number: 0000.

Any ideas on how to keep the zeros when the concantenation takes place?

Thanks,
Bob

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Bob,

Try

=A$1&TEXT(B1,"0000")&C$1

--

HTH

RP
(remove nothere from the email address if mailing direct)


"sunslight" wrote in message
...
I am trying to concantenate something like this:
A B C
1 dog100 0001 red
2 0002
3 0003

I have fields A,C set as Text; field B set as custom "0000"
When I enter all the data, field B shows the beginning zeros: "0000, 0001,
etc." as it should.

If I construct a formula to increment column B by one: Sum(B1,B2) or
"B1+B2" and copy it down the column." The results are correct: 0001,

0002,
0003, etc.

The concantenation I want is thus:
"dog1000001red"
"dog1000002red"
"dog1000003red"

By using absolute references for $A$1, $C$1, and the normal referal
reference for B2 (sum), it does increment by one, but I loose the

beginning
zeros:
"dog1001red, dog1002red, dog1003red."

I thought since column A has numbers in it and it's reading as text, maybe
it needs to be set to custom, 0000 instead, (which really doesn't make any
sense, but I did it anyway) and there was no change.

I don't know how to keep the beginning zeros when concantenating text (or
general) + a formated number: 0000.

Any ideas on how to keep the zeros when the concantenation takes place?

Thanks,
Bob



  #3   Report Post  
sunslight
 
Posts: n/a
Default

Bob,

I answered you, but it looks like the post was removed. --don't know why.

Your solution was exactly correct.

The only problem, I didn't quite ask for what I really wanted.

I guess I'll do a general post again and try to ask the right question.

Thanks,
Bob

"Bob Phillips" wrote:

Hi Bob,

Try

=A$1&TEXT(B1,"0000")&C$1

--

HTH

RP
(remove nothere from the email address if mailing direct)


"sunslight" wrote in message
...
I am trying to concantenate something like this:
A B C
1 dog100 0001 red
2 0002
3 0003

I have fields A,C set as Text; field B set as custom "0000"
When I enter all the data, field B shows the beginning zeros: "0000, 0001,
etc." as it should.

If I construct a formula to increment column B by one: Sum(B1,B2) or
"B1+B2" and copy it down the column." The results are correct: 0001,

0002,
0003, etc.

The concantenation I want is thus:
"dog1000001red"
"dog1000002red"
"dog1000003red"

By using absolute references for $A$1, $C$1, and the normal referal
reference for B2 (sum), it does increment by one, but I loose the

beginning
zeros:
"dog1001red, dog1002red, dog1003red."

I thought since column A has numbers in it and it's reading as text, maybe
it needs to be set to custom, 0000 instead, (which really doesn't make any
sense, but I did it anyway) and there was no change.

I don't know how to keep the beginning zeros when concantenating text (or
general) + a formated number: 0000.

Any ideas on how to keep the zeros when the concantenation takes place?

Thanks,
Bob




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert Excel imported numbers from text to numbers? Alden Excel Discussion (Misc queries) 9 April 1st 05 09:51 PM
Converting Numbers to Text properly Shirley Munro Excel Discussion (Misc queries) 1 February 16th 05 03:01 PM
Convert text to numbers gennario Excel Discussion (Misc queries) 6 January 10th 05 11:56 PM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM
I enter numbers and they are stored as text burkeville Excel Discussion (Misc queries) 5 December 3rd 04 01:59 AM


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"