+ Reply to Thread
Results 1 to 6 of 6

formula if cell content doen not equal certain amount of characters

  1. #1
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    formula if cell content doen not equal certain amount of characters

    I need a VBA formula or code that will help me point out some false serial numbers on our reports.
    How can I have excel point out when a cell does not equal (let say) 10 characters?
    So if a cell contains 9 characters, or 11, it should mark that specifc cellin red fill color.

    I've found a lot on conditional formatting, but this is mostly linked to the value of a cell and not it's content....
    Can anyone help?

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: formula if cell content doen not equal certain amount of characters

    This would check Column A for 10 character cells.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 365
    Posts
    108

    Re: formula if cell content doen not equal certain amount of characters

    Thank you John, this works like a charm!!
    (I knew it had to be something this simple....)

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: formula if cell content doen not equal certain amount of characters

    Actually this can be easily accomplished by using formula Conditional Formatting feature. In Conditional Formatting select "Use formula to determine which cells to format" and enter formula =LEN(A2)<>10 than chose the format to apply.
    Last edited by AlKey; 06-25-2013 at 11:16 AM.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: formula if cell content doen not equal certain amount of characters

    that should probably be =LEN(A2)<>10
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: formula if cell content doen not equal certain amount of characters

    You're welcome. Glad to help out and thanks for the feedback.

+ 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