Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 4 of 4

Thread: reduce number of decimals appearing for calculated variable

  1. #1
    Join Date
    Jan 2011
    Posts
    4

    reduce number of decimals appearing for calculated variable

    In my responses.xls file all cells are formatted to show two numbers after the decimal. However, when a calculated variable is shown to participants during the experiment (i.e. how much they earned), there are 6 numbers following the decimal. How can I fix this?

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    I just checked to see if Excel has a "truncate" function you could use. Looks like you can create a new variable that references the original number like this: =TRUNC(A1,2)

    I had the value 3.554545 in cell "A1" and this other cell displayed 3.55. I expect that is the actual value (3.55) of the new cell and so it would appear as such in MediaLab.

    Never tried it before so let me know how it goes!

  3. #3
    Join Date
    Jan 2011
    Posts
    4
    It worked! Thanks for your help.

  4. #4

    rounding calculated responses

    Just an update that you can do this using a few different Excel functions.

    TRUNC simply cuts the number down
    ROUND rounds the number to the amount of decimals (or an integer) that you specify
    MROUND rounds the number to a multiple that you specify

    For instance, I want a money amount returned in .50 increments so I use the formula: =MROUND(cell,.5)

Similar Threads

  1. Random boxes appearing in question items
    By hoodkb in forum MediaLab Older Versions: Troubleshooting
    Replies: 10
    Last Post: 08-31-2011, 10:28 AM
  2. Can't display calculated items
    By eyal.peer in forum MediaLab Older Versions: Troubleshooting
    Replies: 2
    Last Post: 06-15-2010, 02:31 AM
  3. Making custom instructions and items appearing twice
    By Rene Kopietz in forum MediaLab Older Versions: Troubleshooting
    Replies: 10
    Last Post: 03-24-2010, 04:02 PM
  4. Upgrading to use Reduce Data Files
    By shendric in forum DirectRT Older Versions: General Questions
    Replies: 1
    Last Post: 11-12-2008, 09:41 AM
  5. Display calculated variables to subject
    By KAS in forum DirectRT Older Versions: How Do I...
    Replies: 1
    Last Post: 08-19-2008, 01:29 PM

Posting Permissions

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