+ Reply to Thread
Results 1 to 13 of 13

Matching Number formats based on number format in another cell

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    Palatine, IL USA
    MS-Off Ver
    Excel 2016
    Posts
    34

    Matching Number formats based on number format in another cell

    I am trying to match significant figures on my spreadsheet when i dump data.

    Hypothetical
    D10=23.2

    if i were to dump data in G10 it would be 23.203

    how can i make my data match significant figures so i dont have to manually do line by line

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Matching Number formats based on number format in another cell

    You could use a formula; e.g., for three significant digits,

    =--TEXT(A1, "0.00E+0")
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-04-2013
    Location
    Palatine, IL USA
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: Matching Number formats based on number format in another cell

    Im trying to match significant figures when i dump the data from D10. The significant figures change for each row.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Matching Number formats based on number format in another cell

    Im trying to match significant figures when i dump the data from D10.
    I don't know what that means.

    You could do Options > Advanced > Set Precision as Displayed, but I'd be very cautious; it will irreversibly change the value of constants to their formatted appearance.

  5. #5
    Registered User
    Join Date
    02-04-2013
    Location
    Palatine, IL USA
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: Matching Number formats based on number format in another cell

    When i dump data in G10 i want the significant figures to automatically change to what D10 has

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,917

    Re: Matching Number formats based on number format in another cell

    It seems like the first step in something like this is how to determine how many significant figure D10 has. How do you determine the number of significant figures in D10? Part of determining the number of significant figures is probably going to involve knowing exactly what is in D10. Is D10 the result of a formula? Are the number of digits displayed impacted by number formatting? Will the values in D10 always be "mixed" (integer plus fraction) values, or can they be integers or fraction only values? Is the end goal to change the actual value in column G, or to merely apply number formatting to column G, but retain values in column G to their full precision?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Registered User
    Join Date
    02-04-2013
    Location
    Palatine, IL USA
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: Matching Number formats based on number format in another cell

    data in D10 is fixed i will know the significant figures and they wont change. there will be no fraction (1/4) only decimals (0.25). its completely possible to have 0.5 or 0.50, Im using this for maintaining measurement data.

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,917

    Re: Matching Number formats based on number format in another cell

    How will you know how many sig figs are in D10? Or, perhaps more importantly, what should Excel look at to determine how many sig figs are in D10 (hopefully, by knowing what you would look at to tell you how many sig figs, that will help us know what Excel can look at)?

  9. #9
    Registered User
    Join Date
    02-04-2013
    Location
    Palatine, IL USA
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: Matching Number formats based on number format in another cell

    I have input set data from an engineering print. I have input that data to the correct sig figs.

  10. #10
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,917

    Re: Matching Number formats based on number format in another cell

    So, it needs to look at the number of digits you enter. That sounds like a LEN() function. The main difficulty will be how to interpret trailing zeroes. How many significant figures in 230? LEN(230) is three, but that could only be 2 sig figs. What about 2.30? Is that three sig figs, or two? LEN(2.30) returns 3 (minus the decimal character will see 2 sig figs).

    There could be some value in entering values as text rather than number. Where LEN(2.30) is 3, LEN("2.30") is 4, which could help with detecting trailing zeros that are significant to the right of the decimal point, but those numbers are then text strings, not real numbers, which can create other issues.

  11. #11
    Registered User
    Join Date
    02-04-2013
    Location
    Palatine, IL USA
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: Matching Number formats based on number format in another cell

    This is still going to make me have to curate 500 lines of information. Is there a conditional formatting that will allow to match decimal place?

  12. #12
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,917

    Re: Matching Number formats based on number format in another cell

    I'm not certain I understand the concern. Yes, you will need to apply the formula to all 500 lines, but once you get the formula figured out, you can enter it once and copy it down 500 times.

    We could do this with conditional formatting, but it seems like we would still have the same issue -- what formula to use to "count" the sig figs in column D. To my knowledge, Excel just does not have a built in, preprogrammed function to count sig figs.

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Matching Number formats based on number format in another cell

    You might consider posting a workbook with a clear explanation of what you're trying to do.

+ 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] How to Sum based on partial match of a cell in number format (not text format)
    By NBehrens in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-24-2017, 12:34 PM
  2. Replies: 2
    Last Post: 01-28-2015, 09:07 AM
  3. [SOLVED] How to Change all the different Number formats to a uniform format.
    By adil.master in forum Excel General
    Replies: 3
    Last Post: 09-14-2012, 06:07 AM
  4. Number Format:What I wish to have is a code that formats l
    By LoganStallworth in forum Excel General
    Replies: 3
    Last Post: 09-28-2005, 07:57 PM
  5. Matching number formats
    By raystub in forum Excel General
    Replies: 4
    Last Post: 05-25-2005, 03:00 PM
  6. number formats that allow you to format the appearance of negativ.
    By jassmon in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-15-2005, 06:07 AM
  7. Number format based on number format of another cell in another workbook
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-09-2005, 01:06 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