View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jheath.bc[_2_] jheath.bc[_2_] is offline
external usenet poster
 
Posts: 2
Default Logical test IF a decimal was typed in a cell

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!

"Max" wrote:

One try: =IF(ISNUMBER(SEARCH(".",A1)),"do this","do that"))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"jheath.bc" wrote:
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)