+ Reply to Thread
Results 1 to 5 of 5

conditional decimal places?

  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    ANtwerp, Belgium
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    conditional decimal places?

    Hi all,

    I have a question which would mean a huge time-saver if resolved. Here is what i want/need to do:
    I have a column with numbers (say column A) and a column with types of measurements (e.g. m3, m2, kg, piece,...) (say column B).

    I need the values in column A to be displayed with a different amount of decimal places, depending on the measurement type column B

    e.g if B1 = m3, A1 has to display 7.561, if B1 = kg, A1 has to display 7.3
    I can not figure out how to do this, Hopefully this is possible (or is there a work around?).

    Thanks!

    Naat

    p.s. not a native English speaker so sorry if unclear.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: conditional decimal places?

    • Select the Col_A cells to be impacted
    • Home.Conditional_Formatting...Manage_Rules
    ...Click: New Rule
    ...Select: Use a formula to determine which cells to format
    ...=B1="m3"
    ...Click: Format...Number_tab...Custom...Type: 0.000...Click: OK...Click: OK
    ...Click: New Rule
    ...Select: Use a formula to determine which cells to format
    ...=B1="kg"
    ...Click: Format...Number_tab...Custom...Type: 0.0...Click: OK...Click: OK
    ...Click: OK

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    08-14-2013
    Location
    ANtwerp, Belgium
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Re: conditional decimal places?

    Hi Ron,

    Thanks for your reply, unfortunately I'm not able to select the "number" tab when selecting format (I only see the "font", "border" and "fill" tabs)...
    I'm not exactly an excel expert so I might be doing something wrong...
    I attached an image to show you where i got stuck (I have the dutch version of excel for Mac 2011).Screen Shot 2013-08-14 at 5.52.23 PM.jpg

    Thanks again.

    Regards.

    Nathan

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: conditional decimal places?

    Hmmm...I'm guessing it's an inconsistency between "Excel for Mac" and Excel for Windows.

  5. #5
    Registered User
    Join Date
    08-14-2013
    Location
    ANtwerp, Belgium
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Re: conditional decimal places?

    OK, thanks for the help, i'll see if i can try this on a pc somewhere...

+ 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] Calculating decimal places in a non decimal format (ie sixes not tens)
    By Mike Brewer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2013, 08:58 AM
  2. Conditional Number Format for varying decimal places
    By justme23 in forum Excel General
    Replies: 3
    Last Post: 04-30-2010, 03:31 PM
  3. conditional formatting for 0 in 2 decimal places
    By mingali in forum Excel General
    Replies: 11
    Last Post: 02-27-2010, 05:34 AM
  4. Paste two decimal number in excel without extra decimal places appearing
    By jeffery_frick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2009, 07:49 PM
  5. Replies: 3
    Last Post: 07-06-2005, 09:05 AM

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