LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Determine decimal

I'm trying to create a spreadsheet at work that used for reporting test
results but I've run into a potential problem.

The actual results are simple with an IF statement comparing an average (A1)
to a specification (S1) and reporting the average if its below the
specification or "Fail" if it's above the spec. It looks like this:

=IF(A1<=S1, A1, "Fail")

The specification varies from a whole number to a decimal, depending on the
sample tested. If the spec is 5 then what I'm actually using in the equation
is 5.49 such that, when rounded to the correct level of precision, the result
is "not more than" then given spec. If the spec is 0.2 then the value in the
equation would be 0.249.

The problem is that I'd like to make this one spreadsheet work for all
samples and therefore all specifications (5 to 0.2) and the quick formulas I
know of won't work for something that changes the level of precision.

Is there a way to determine the number of decimal places in a cell such that
"if S1 has 0 decimals then yield this result"?

I've tried the function ROUND( but I can't float the decimal (at least I
don't know how to). If I were able to get that function to round to the
level specified in S1 then that might work...
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set automatic currancy decimal without entering the decimal? Giesej Excel Worksheet Functions 3 March 2nd 09 12:09 AM
Subtracting two 2-decimal place numbers gives result 13-decimal places? [email protected] Excel Worksheet Functions 5 March 12th 07 10:38 PM
Batch converting CSV files from comma-decimal to period-decimal Nodles Excel Discussion (Misc queries) 3 July 5th 06 06:57 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT. SUKYKITTY Excel Discussion (Misc queries) 3 July 6th 05 01:50 PM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"