+ Reply to Thread
Results 1 to 14 of 14

Conditional formatting of a cell in a column if character count reaches a limit

  1. #1
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Conditional formatting of a cell in a column if character count reaches a limit

    Hi , I want to highlight a cell in a column if the character count is greater than say 100. How can i apply this to a entire column or a particular range (i would like to know for both cases). I am using Excel 2007, please guide me where i need to apply this?

  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,929

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    you can do this with conditional formatting

    1. highlight the range you want to apply the conditional formatting to
    2. on the home tabe, styles, select CF
    3. select new rule, select use formula
    4. enter =len(a1)>100

    you can either select just the range you need (prefered), or use the column reference A:A
    note tho that using an enrire row or column can be a big drain on system resources
    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
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    Thanks for the response FDibbins! I have tried this formula in Conditional Formatting->New Rules->Use a formula to determine which cells to format. I tried this several times already, dont really understand why it doesn't work


    Quote Originally Posted by FDibbins View Post
    you can do this with conditional formatting

    1. highlight the range you want to apply the conditional formatting to
    2. on the home tabe, styles, select CF
    3. select new rule, select use formula
    4. enter =len(a1)>100

    you can either select just the range you need (prefered), or use the column reference A:A
    note tho that using an enrire row or column can be a big drain on system resources

  4. #4
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    Need help to resolve this!

  5. #5
    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,929

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    can you upload a sample workbook for me to look at?

  6. #6
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Question Re: Conditional formatting of a cell in a column if character count reaches a limit

    Employee_Details.xlsx

    Hi! I have attached workbook, i assume the limit in the Comments column(for each cell) to be 10 characters. Please suggest the changes.

    Quote Originally Posted by FDibbins View Post
    can you upload a sample workbook for me to look at?

  7. #7
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    Thanks FDBinns! I finally figured it out! To people who are a noob like me, first we need to select the entire column for which we need to apply this formatting. Then go to Conditional Formatting->New Rules->Use a formula to determine which cells to format. Enter the formula =LEN(FirstCellInTheColumnRange)>10, select the color you need to highlight. For Example, if the Column is A, select the entire column first, and in conditional formatting the formula will be applied to the first cell in the Column i.e =LEN(A1)>10, if the column is F, select the F column, then the formula will be =LEN(F1)>10.

  8. #8
    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,929

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    Pavan, I thought thats what I said in post #@ lol, but im happy that you got your question resolved

  9. #9
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    FBDibbins, my bad i didnt understand it at first shot. Once it worked fine, I realized that what u explained made perfect sense. i blame my noobness.

  10. #10
    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,929

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    not a problem at all, we all have to start somewhere

    edit: I just noticed that you said "first we need to select the entire column for which we need to apply this formatting. ". Just so that you are aware, its mostly not a good idea to apply CF to entire rows or columns, as it can become very resource-intensive. It is better if you can just apply CF to the range needed, or, if the range is going to continue to grow, to maybe 2-or-32 times the size of the expected range
    Last edited by FDibbins; 01-06-2013 at 02:40 PM.

  11. #11
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    Thanks for the advice! The number of rows displayed keeps changing. Need to find a workaround for this.

    Quote Originally Posted by FDibbins View Post
    not a problem at all, we all have to start somewhere

    edit: I just noticed that you said "first we need to select the entire column for which we need to apply this formatting. ". Just so that you are aware, its mostly not a good idea to apply CF to entire rows or columns, as it can become very resource-intensive. It is better if you can just apply CF to the range needed, or, if the range is going to continue to grow, to maybe 2-or-32 times the size of the expected range

  12. #12
    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,929

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    Yup, I understand that (been there done that lol) What I do is to make my range 2-3 times longer than I think I will need. If you need to change it (much) later, then you can

  13. #13
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Conditional formatting of a cell in a column if character count reaches a limit

    I just recorded a macro. I think i can easily do some changes here to make it work with my code.

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    12-24-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    99

    Post Re: Conditional formatting of a cell in a column if character count reaches a limit

    I just recorded a macro. I think i can easily do some changes here to make it work with my code.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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