Share via

Hyphens in Spreadsheet

Anonymous
2015-06-18T00:04:09+00:00

Hi, I am doing some data entry in the Microsoft Excel 2010 spreadsheet. Between each number there is a hyphen (no spaces between number and hyphen). Examples: 4-9-2-10 or 3-7-1-5. Since I don't understand the Formulas, then I would like to ask the community if there is a way that a hyphen can automatically be inserted as soon as I type a number. As things stand, I have to press a number, then press the hyphen key. It would be so much quicker if I did not have to touch the hyphen key. I have 12 columns that I am putting these figures into. Thank you

JIMOA

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2015-06-18T10:31:59+00:00

    Nice. 

    That will work if the last set of four has double digits.

    I'm still not clear if that was a typo or if the fourth -- or any other -- position can be one or more digits.

    JIMOA, we really need your feedback here. Please reply.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-06-18T10:30:20+00:00

    The question is not about concatenating cells, but about formatting data that is entered into a single cell.

    Was this answer helpful?

    0 comments No comments
  3. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2015-06-18T10:18:02+00:00

    For 3 to 5 digit +ve numbers, you can use following custom format ( A maximum of only 2 conditions + one else is possible in custom format taking care of 3 scenarios, hence 3 to 5 digits) -

    [<1000]#-#-#;[<10000]#-#-#-#;#-#-#-##

    Hence

    123 = 1-2-3

    1234 = 1-2-3-4 (takes care of 3-7-1-5)

    12345 = 1-2-3-45 (takes care of 4-9-2-10)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-06-18T10:01:16+00:00

    Hi ,

    You can use the formula in shown in the print screen , you need to type the numbers in different cells & then you can combine them through a"hyphen"" & consolidate value will come as shown in print screen below.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2015-06-18T01:04:18+00:00

    Hello,

    what is the logic for 4-9-2-10. Why not 4-9-2-1-0?

    If you only have four digits in each number you could use a custom number format to separate each digit with a - sign, for example

    #-#-#-#

    Was this answer helpful?

    0 comments No comments