+ Reply to Thread
Results 1 to 8 of 8

conditional format last letter before numbers

  1. #1
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    conditional format last letter before numbers

    my cells contain a name then an "N" or "D" before a number between 1-12
    If there is an N I would like to colour red and a D would be coloured Green
    so a names like Dan Noon D12 would be coloured Green due to D12
    a name like Nancy Day N8 would be coloured Red due to N8
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: conditional format last letter before numbers

    Hi Grizzly,

    Try this attachment. I used the first letter after the last space instead of what you suggested. I think it will work for your sample text. See attached and the conditional formatting formulas. Just ask if you need an explaination.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    86

    Thumbs up Re: conditional format last letter before numbers

    Quote Originally Posted by grizzly6969 View Post
    my cells contain a name then an "N" or "D" before a number between 1-12
    If there is an N I would like to colour red and a D would be coloured Green
    so a names like Dan Noon D12 would be coloured Green due to D12
    a name like Nancy Day N8 would be coloured Red due to N8

    Hi grizzly6969 ,

    i think it will work as per your requirment.format.xls

  4. #4
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: conditional format last letter before numbers

    Thanks MarvinP works great

  5. #5
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: conditional format last letter before numbers

    your formula works equally as well Md Aejaz --- many thanks

  6. #6
    Registered User
    Join Date
    06-28-2011
    Location
    New Delhi India
    MS-Off Ver
    Excel 2003 ,2007
    Posts
    23

    Re: conditional format last letter before numbers

    Use below formula in your conditional formatting

    LEFT(TRIM(RIGHT(A1,3)))="D" ' make pattern red
    LEFT(TRIM(RIGHT(A1,3)))="N" ' make pattern green

    select cell A1 then go to in conditional formatting--->> manage Rules --> use formula to determine which cell format -->place the LEFT(TRIM(RIGHT(A1,3)))="D" in formula bar option and set the pattern red ...


    do same for green ... select cell A1 and repeat the above process and place green pattern with LEFT(TRIM(RIGHT(A1,3)))="N"

    then after copy the cell A1 and paste it in rest cells as formatting special
    Purushottam
    Excel, MS ACCESS 2007

  7. #7
    Registered User
    Join Date
    06-28-2011
    Location
    New Delhi India
    MS-Off Ver
    Excel 2003 ,2007
    Posts
    23

    Re: conditional format last letter before numbers

    Sorry guys , I just posted late ... dont mind.

  8. #8
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: conditional format last letter before numbers

    I tried your formula Puru.Sve and worked as well ---- thanks to all who helped

+ 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