Results 1 to 8 of 8

How to put a forward slash /

This is a discussion on How to put a forward slash / within the Excel Questions forums, part of the Question Forums category; Hi everybody, Is there a way to have Excel automatically put a forward slash in between two numbers in a ...

  1. #1
    New Member
    Join Date
    Jun 2007
    Posts
    47

    Default How to put a forward slash /

    Hi everybody,

    Is there a way to have Excel automatically put a forward slash in between two numbers in a cell. For exmple if you type the number 69, have excel put it as 6/9?

    Thanks in advanced,
    Alex

  2. #2
    Board Regular dave3009's Avatar
    Join Date
    Jun 2006
    Location
    Glasgow, Scotland
    Posts
    6,292

    Default Re: How to put a forward slash /

    Given D2 holds your two digit number

    =IF(LEN(D2)=2,LEFT(D2,1)&"/"&RIGHT(D2,1),D2)

    You need a macro to do it without a function

  3. #3
    Board Regular scottylad2's Avatar
    Join Date
    Feb 2009
    Location
    East Lothian.....near Edinburgh
    Posts
    1,913

    Default Re: How to put a forward slash /

    As long as there's only 2 numbers you can go to the format menu, go to custom and use the following and drag to all the cells you need to effect ?"/"?

  4. #4
    Board Regular scottylad2's Avatar
    Join Date
    Feb 2009
    Location
    East Lothian.....near Edinburgh
    Posts
    1,913

    Default Re: How to put a forward slash /

    if there are more than 2 numbers, it'll show 2 numbers to the left of the slash and always only one to the right. but you can try more custom formatting i'm sure theres a workaround

  5. #5
    New Member
    Join Date
    Jun 2007
    Posts
    47

    Default Re: How to put a forward slash /

    It worked!!! Thank you very much!!!

  6. #6
    MrExcel MVP mikerickson's Avatar
    Join Date
    Jan 2007
    Location
    Davis CA
    Posts
    16,813

    Default Re: How to put a forward slash /

    Or you could format the cell with the custom format
    0"/"0

  7. #7
    Board Regular scottylad2's Avatar
    Join Date
    Feb 2009
    Location
    East Lothian.....near Edinburgh
    Posts
    1,913

    Default Re: How to put a forward slash /

    These custom formats, either ?"/"? or 0"/"0 do pretty much the same but only work with whole numbers. if you put decimals in there you get some odd results. 4.5 in both show up as 0/5 so as long as it's whole numbers your separating you'll be ok

  8. #8
    New Member
    Join Date
    Jun 2007
    Posts
    47

    Default Re: How to put a forward slash /

    You guys are awesome!!!

    Thanks

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com