+ Reply to Thread
Results 1 to 7 of 7

How to format cells to show only significant figures entered?

  1. #1
    Registered User
    Join Date
    09-23-2008
    Location
    mobile
    MS-Off Ver
    07
    Posts
    43

    How to format cells to show only significant figures entered?

    I’m trying to set up tables for pivot table analysis so I have a column with test name and then another with test results which have different significant figures. Can I use conditional formatting to change the number of decimal places shown depending on which test name is used in another column?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Conditional formatting can't change number formats. How about just using format General?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-23-2008
    Location
    mobile
    MS-Off Ver
    07
    Posts
    43
    I dont know the order of tests to be recorded so I would not be able to predefine the cells and formatting the cells on the spot would waste time.

    I can do it with my mouse and record a macro but how do I look at the code of the macro?

    Could it be something like: If $A$1 = a then $B$1 = cell format, number, decimal = 3?

    I can get to format cell by right clicking on the cell where it shows the F is underlined or from the home tab it has a format button where "format cells" has an e underlined but ctrl + the letter never work to bring them up.

    If it did work could you just be like right click, CTRL+F, Tab, CTRL+d, down, down, enter, esc with the code?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    General is the default format for cells unless you deliebrately change it. You don't have to do anything.

  5. #5
    Registered User
    Join Date
    09-23-2008
    Location
    mobile
    MS-Off Ver
    07
    Posts
    43
    General works until you happen to show measurement less precisely with zeros not being shown. Error analysis will stay the same - contrary to whats shown. Can you tell me how to run an error code check with code to fix displayed zeros after the decimal - maybe with a ReplaceIf?

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941
    Have you considered scientific notation as a format for the results column?
    As for:
    I can do it with my mouse and record a macro but how do I look at the code of the macro?
    After recording the macro, right click the sheet tab and select view code. Then in the Project window, click the (+) next to the workbook name to expand the modules then select Module1 to view the code.
    Ben Van Johnson

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    General works until you happen to show measurement less precisely with zeros not being shown.
    Pardon me?

+ 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. Format of linked cells
    By notgotaclue in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2008, 06:54 AM
  2. Replies: 2
    Last Post: 04-27-2008, 07:57 PM
  3. Replies: 2
    Last Post: 04-24-2008, 09:39 PM
  4. Assignment overDUE PLEASE PLEASE HELP!!
    By undergrad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2006, 12:34 AM
  5. Comparing Lists - F2 - Format Cells
    By sachinattri in forum Excel General
    Replies: 7
    Last Post: 11-03-2006, 02:29 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