• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Concatenate and Custom Format

bfraser

Member
A1 B1 C1

CB 0001- 1-CB


A1 B1 C1 -When "Show Formulas" selected

CB 1 =CONCATENATE(B2, "-",A2)


Question: A1 and B1 are combined and reversed. B1 uses custom format of 0000- to go from 1 to 0001-. Result is 1-CB. How do I get C1 to come up w/0001-CB.
 
bfraser

Try

=CONCATENATE(TEXT(B2,"000#"), "-",A2)


Concatenate joins text strings together and so if you want a number in a particular format you must tell it that and the best way is to use the Text() function
 
whoops, pushed enter by mistake


The custom Format you have used for B2 is for display purposes only, The number is still 1 behind the scenes
 
Back
Top