+ Reply to Thread
Results 1 to 9 of 9

Difficult conditional formatting

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Difficult conditional formatting

    Hello. I have the following line items in column A. I would like to create a conditional formatting that does the following. Based on value in A, color rows a certain color. If column A value starts with mb (NOT case sensitive) or has only six numbers at the beginning (for example, 601800 as apposed to 601800 601800 etc) I want to color it one color, and everything else (except for blanks) should be colored another color. Please help.


    601190 601190 5007 ACCRUED PTO
    601150 601150 5033 WAGES OVERTIME
    601800 601800 5043 SEVERANCE

    mb - other salary expense

    602000 602100 5021 401K MATCH

    mb - deferred compensation

    601001 601200 5042 COMMISSIONS
    601001 601300 5046 OTHER COMP - WELLNESS REWARDS
    601001 601300 5049 OTHER COMPENSATION
    601001 601200 5041 INCENTIVE COMPENSATION

    621100 occupancy expenses

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Difficult conditional formatting

    For your CF rule use (use formula) this...

    =or(A="MB",len(A1)<6)

    If you color everything using regular formatting, you wont need a 2nd rule
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Difficult conditional formatting

    I think that's close but no cigar. The "MB" part is fine but if there are two line items: 1) 601800 601800 5043 SEVERANCE and 2)
    621100 occupancy expenses .... I want to reference the second type in the conditional formula. It is NOT less than 6 characters, it just has 6 numbers to start as apposed to the 16 number in the other line item.

    Also, you forgot to fix the A column with "$A" otherwise it doesn't work. And I also need to include something so it doesn't format where the rows are blank. Please help.
    Last edited by amartino44; 10-11-2013 at 06:03 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Difficult conditional formatting

    Well that gives you a start, hope you get it resolved

  5. #5
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: Difficult conditional formatting

    Actually, it makes no sense because it's not that it = MB, it's that it starts with MB. Excel experts can't read.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Difficult conditional formatting

    You may have read that my title is Moderator, not expert?

    Be that as it may, a wise man once said...if you have noting good to say - say nothing

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Difficult conditional formatting

    For the MB part select the column, Conditional Formatting, create New Rule, use formula... and enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and select the formatting of your choice

    The other requirements are something else.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,294

    Re: Difficult conditional formatting

    =NOT(ISNUMBER(MID(A1,8,1)*1))
    Try this one
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Difficult conditional formatting

    Quote Originally Posted by amartino44 View Post
    ....Excel experts can't read.....
    I read that part OK

    With an attitude like that you may find that contributors here are disinclined to answer your queries
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Difficult conditional formatting
    By Leslie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  2. Difficult conditional formatting
    By Leslie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  3. Difficult conditional formatting
    By Leslie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  4. Difficult conditional formatting
    By Leslie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. Difficult conditional formatting
    By Leslie in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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