+ Reply to Thread
Results 1 to 6 of 6

2007 dual format a column

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    4

    2007 dual format a column

    I am trying to figure out how to get the cells in a column to have 2 colors. I'm trying to get the first 13 digits to come out red with the remaining digits black. I don't have any hair to pull out so I am hoping someone out there knows how to do this.

    Thanks

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,777

    Re: 2007 dual format a column

    You can't format individual digits in numeric data.

    You can do it with text data, but it doesn't get carried along with format painter so you would have to do it for each individual cell.

    The only thing I can think of here would be a VBA macro that copies the numeric data into a text string and then formats the individual characters the way you want.

    Perhaps another workaround solution would be some arithmetic to put the first 13 digits in one cell, and the remaining digits in the adjacent cell, and formatting as desired to give the look of a single number.

    How many digits are you dealing with, anyway? Excel only maintains precision to 15 significant digits.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-21-2011
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: 2007 dual format a column

    Hey 6string

    The cell entries always start with 13 digits, followed by a space, then verbiage. The verbiage can be short or somewhat lengthy. All the entries are copied from one outside source spreadsheet and pasted into a new one for "tracking" purposes. I'm thinking that the tracking spreadsheet would have to be modified to extract the 13 digits, make them red, and imported into an adjacent cell. Leaving the verbiage in black. Now it's just figuring out how to do that.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,777

    Re: 2007 dual format a column

    That means the cell is text, not numeric. That is a completely different problem than a cell that is numeric. Your case is quite easy.

    This macro will make the first 13 characters of a string in the active cell red.

    Please Login or Register  to view this content.
    Let me know if you need more details about how to use it.

  5. #5
    Registered User
    Join Date
    06-21-2011
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: 2007 dual format a column


    Thank you tons for that. Now I'm on the hunt for an answer to do an entire column just like macro you provided.

  6. #6
    Registered User
    Join Date
    06-21-2011
    Location
    Maryland
    MS-Off Ver
    Excel 2007
    Posts
    4

    (SOLVED)2007 dual format a column

    Thanks 6string. Got it all figured out!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1