Logical test IF a decimal was typed in a cell

J

jheath.bc

I'm wondering if there is a way to create a logical test to find out if a
decimal point was typed in a cell.

"16" would be false.
"16." would be true.

=if(a1 contains a decimal,a1,else use other formula)
 
J

jheath.bc

Looks promising, but it didn't work. This was the original formula I was
trying to test for. It may seem odd, but it allows me to enter
feet-Inches-Sixteenths in the following format FFIISS. 160112 returns the
value of 16' 1-3/4". It is an entry format used in the US wood truss
industry.
=INT(B4/10000)+(MOD(INT(B4/100),100)+MOD(B4,100)/16)/12

The entry format doesn't use a decimal, but it would be nice if I could
enter "16." for 16 feet instead of 160000. Hence the test for a decimal point.

Here is the formula including your suggestion. Perhaps I didn't get it quite
right
=IF(ISNUMBER(SEARCH(".",B3)),B3,INT(B3/10000)+(MOD(INT(B3/100),100)+MOD(B3,100)/16)/12)
Thanks!
 
M

Max

Maybe you could enter say, an "f" instead as an identifier?
So if you enter in B3: 16f
think you could try this in say, C3:
=IF(ISNUMBER(SEARCH("f",B3)),LEFT(B3,SEARCH("f",B3)-1)+0,INT(B3/10000)+(MOD(INT(B3/100),100)+MOD(B3,100)/16)/12)
 
R

Ron Rosenfeld

The entry format doesn't use a decimal, but it would be nice if I could
enter "16." for 16 feet instead of 160000. Hence the test for a decimal point.

The only way I know of to differentiate 16 and 16. during data entry would be
if the 16. were entered as text. One way to do that would be to precede the
entry with a single quote, so you would enter '16.

I'm not sure if this would be enough quicker and error-free compared with
entering 160000 to make it worthwhile.
--ron
 
J

jheath.bc

Thanks Max! It works for me, and preserves the numeric value for further
calculation. I did change the letter to "d" as in decimal ;)
I appreciate your help, and the other replies as well.
Thanks
Jon Heath
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top