Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Format Cells in Excel 2007 (https://www.askmehelpdesk.com/showthread.php?t=243463)

  • Jul 30, 2008, 02:15 PM
    kim31
    Format Cells in Excel 2007
    Is there a way in Excel to automate adding hyphens in a specific position in a column of numbers
    (like a mac address list)
    For example: 0021e96c4183
    00-21-e9-6c-41-83
    HOWEVER
    When I use this method Home tab, Cell group, click on Format
    On Number tab from the Format Cells dialog screen I'd select Custom and type on General text box this: 00-00-00-00-00-00
    It does not enable that particular format for me but on my supervisor's computer she got it to work when it didn't work in the past for her
    She said she didn't do anything special at all just keep trying and suddenly it worked for her

    I have spent hours and days trying to figure this thing out and I can't
    I've tried it on different computers too
    Could it be a bug in Excel 2007? Why does it work sometimes and it doesn't at other times?:confused: :confused: :confused:
  • Jul 30, 2008, 04:36 PM
    JBeaucaire
    I can't figure how to do that in a single cell AT ALL. I'd just use 6 adjacent cells. If for some reason you NEEDED to see it all in one cell, you could then concatenate the 6 cell entries. THAT would work.

    =A1&"-"&A2&"-"&A3&"-"&A4&"-"&A5&"-"&A6
  • Jul 30, 2008, 05:31 PM
    KISS
    I'd just use 2 cells, the 1st celll would be the one without hyphens and the second would have a formula like

    =MID(A1,1,2)&"-"&MID(A1,3,2)&"-"&MID(A1,5,2)&"-"&MID(A1,7,2)&"-"&MID(A1,9,2)&"-"&MID(A1,11,2)

    EDIT: Fixed formula
  • Jul 31, 2008, 01:12 AM
    JBeaucaire
    You could keep the sheet clean in appearance, extending the suggestion above, by having the two cells side by side, but the cell you enter data in is tiny, and formatted to show WHITE text, making your entries basically invisible, and then the wider attractive cell to the right with the formula above.

    You could use VALIDATION and cell locking to keep people from entering text in the second cell, and validation errors you get to word the error message, so you could pop it up to say, "You must not enter anything in this cell. Please abort and enter your MAC address info in the cell to the left."
  • Jul 31, 2008, 04:34 AM
    mdosh01
    Custom formatting only applies to numbers, not text. I have to assume the reason it works some times and other times not, is because if the entry is "0021e96c4183" contains text. Whereas if the entry is "002139624183" it works fine because it is all text.

    I tried this in Excel 2003 and verified the results. Maybe 2007 does have custom text capabilities.

  • All times are GMT -7. The time now is 04:56 AM.