+ Reply to Thread
Results 1 to 9 of 9

Conditional formatting numbers with units

  1. #1
    Registered User
    Join Date
    05-26-2015
    Location
    Gdansk, Poland
    MS-Off Ver
    2016
    Posts
    42

    Conditional formatting numbers with units

    Hi All,

    I would like to use conditional formating in my spreadsheet with both numbers and letters (units) but don't know how. For example I have 100 kg in one cell how do I highlight values that ate above and below 100 kg ?

    Thanks for your help
    Attached Files Attached Files
    Last edited by panmuskul; 01-21-2022 at 07:44 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: Conditional formatting numbers with units

    One example won't be enough for us to give you an answer, especially if there are other weights and measures involved.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-26-2015
    Location
    Gdansk, Poland
    MS-Off Ver
    2016
    Posts
    42

    Re: Conditional formatting numbers with units

    Hi Ali,

    Good point, just added a sample to my original post. Thanks a lot

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: Conditional formatting numbers with units

    As you are in Southampton, I am wondering why you are using the comma as a decimal separator??? Is this correct? It does matter.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: Conditional formatting numbers with units

    Anyway, as it stands, the two rules would be:

    =--SUBSTITUTE(SUBSTITUTE(C3,",",".")," m","")<4

    =--SUBSTITUTE(SUBSTITUTE(C3,",",".")," m","")>9

    These would be applied to C3 and then the entire range defined in the Applies To box.
    Attached Files Attached Files
    Last edited by AliGW; 01-21-2022 at 07:54 AM.

  6. #6
    Registered User
    Join Date
    05-26-2015
    Location
    Gdansk, Poland
    MS-Off Ver
    2016
    Posts
    42

    Re: Conditional formatting numbers with units

    Hi Ali,

    Thanks for your reply. To answer your question about comma - I am currently living in Poland and here we use comma as a decimal seprator.

    I don't really understand the solution, would you mind attaching an excel spreadsheet with those rules applied ? I hope it's not too much trouble.

    Thank you

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: Conditional formatting numbers with units



    I did attach a workbook 15 minutes ago ... Can you not see it? I thought you had looked at it???

    However, given your disclosure, the rules won't (or may not) work.

    Try these instead:

    =--SUBSTITUTE(C3," m","")<4

    =--SUBSTITUTE(C3," m","")>9

    You may need to change the comma to a semi-colon in these rules for a Polish locale.

    I am currently living in Poland ...
    Please update your profile. The location is important so that we know which locale you are likely to be using.
    Last edited by AliGW; 01-21-2022 at 08:14 AM.

  8. #8
    Registered User
    Join Date
    05-26-2015
    Location
    Gdansk, Poland
    MS-Off Ver
    2016
    Posts
    42

    Re: Conditional formatting numbers with units

    It works ;] perfect thank you very much

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,914

    Re: Conditional formatting numbers with units

    Fab!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

    Administrative Note:

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.

+ 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. [SOLVED] Sum of units over a time period starting with initial units and a known growth rate
    By MMMMMMMMMJ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-15-2021, 03:34 AM
  2. [SOLVED] Need to convert hours to billable units and then subtract from the total units provided
    By Slickback724 in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 5
    Last Post: 04-14-2020, 04:39 PM
  3. Trying to do conditional counting, units within units
    By Butcher1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-17-2016, 01:01 PM
  4. [SOLVED] Conditional formatting - formatting the lowest 2 numbers in a list of 12 numbers
    By ktbb0312 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-09-2013, 09:59 AM
  5. Replies: 9
    Last Post: 03-26-2012, 02:16 PM
  6. Calculation with numbers that use measurement units
    By Kriman in forum Excel General
    Replies: 1
    Last Post: 01-07-2009, 12:10 PM
  7. Removing units from numbers
    By srootie in forum Excel General
    Replies: 1
    Last Post: 05-17-2005, 06:58 AM

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