Consulting

Results 1 to 6 of 6

Thread: Formula results in significant figures

  1. #1

    Formula results in significant figures

    How can I format a formula to a user specified number of significant figures. What I'd like to be able to do is select a cell (or range of cells) that contains a formula and have the result formatted to let's say 3 significant figures. I've seen many solutions for formatting numbers in cells to a specific number of significant figures, and I've tried to modify a few with no success. Any ideas?

    Thanks,
    Kathy

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Set a format (Format>Cells>Custom) of

    #,##0.000
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Expert
    Joined
    Aug 2007
    Location
    Windermere, FL, a 'burb in the greater Orlando metro area.
    Posts
    567
    Location
    Kathy,

    Do you want to round your result to that number of significant digits, or merely to display the answer to that many significant digits?

    Do you want all cells to round to their number of displayed digits or just selected cells (for instance, maybe, only round this cell with the result)?

    Thanks,

    Ron

  4. #4
    I need it to round the result to the number significant digits. I was thinking just selected cells since the data that I am doing calculations on is already in significant figures and I just have to format them.

    Thank you,
    K

  5. #5
    =ROUND(A1,4)

    Where "A1" is your cell reference for the number or formula result and "4" is the number of decimal places you want. You can also use negative numbers in place of 4 to round to whole thousands place and so on.

    If you want to use it in your formula, just make it look like an algebra problem >.o

    as in :

    =ROUND((A1*B1),1)

    In the above, if A1=25 and B1=3.785 then the result would read 94.6 instead of 94.625.

    =ROUND((A1*B1),-1)

    The above result there would be 90.

  6. #6
    Unfortunately, just using the Round function would be manually intensive in that I would need to look at each formula result individually and determine the number of significant figures (and the results vary from 99,999 to 0.00999. What we are doing right now is copying and pasting the formula results, then running a sigfig macro on them, copying and pasting them back into the table which obliterates the formula. I would like to be able to save the formulas for review.

    K

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •