View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Convert inches & display as Feet Inches and Fractions -- BUG F

Hi,

I got it to work in 2007 after removing the CR's and letting Excel make a
correction some where? Here is the final working formula, which I modified a
little bit:

=IF(ROUND(ABS(C34)*16,0)=ABS(C34)*16,"","~")&IF(OR (C340,ROUND(ABS(C34)*16,0)=0),"","(")&TRIM(IF(INT (ROUND(ABS(C34)*16,0)/192)=0,"",INT(ROUND(ABS(C34)*16,0)/192)&"'
")&IF(AND(ROUND(ABS(C34)*16,0)<0,MOD(ROUND(ABS(C3 4)*16,0),192)=0),"",TRIM(IF(AND(ROUND(ABS(C34)*16, 0)<0,INT(MOD(INT(ROUND(ABS(C34)*16,0)),192)/16)=0),"",INT(MOD(INT(ROUND(ABS(C34)*16,0)),192)/16)&IF(MOD(INT(ROUND(ABS(C34)*16,0)),16)=0,"","-"))&IF(MOD(INT(ROUND(ABS(C34)*16,0)),16)=0,"",TRIM (TEXT(MOD(INT(ROUND(ABS(C34)*16,0)),16)/16,"??/??")))&"""")))&IF(OR(C340,ROUND(ABS(C34)*16,0)=0) ,"",")")

Anytime I see a formula of this length i'm tempted to use VBA.

Cheers,
Shane Devenshire

"David Biddulph" wrote:

Looks as if the format exceeds Excel 2003's function nesting limit.
--
David Biddulph

"smartin" wrote in message
...
Mark Main wrote:

=IF(ROUND(ABS(A1)*16,0)=ABS(A1)*16,"","~") & IF(OR(A10,ROUND(ABS(A1)
*16,0)=0),"","(") & TRIM(IF(INT(ROUND(ABS(A1)*16,0)/(12*16))=0,"",INT
(ROUND(ABS(A1)*16,0)/(12*16))&"' ") & IF(AND(ROUND(ABS(A1)*16,0)<0,MOD
(ROUND(ABS(A1)*16,0),(12*16))=0),"",TRIM(IF(AND(RO UND(ABS(A1)*16,0)
<0,INT(MOD(INT(

'Excel 2003 flags error here ):
ROUND

(ABS(A1)*16,0)),(12*16))/16)=0),"",INT(MOD(INT
(ROUND(ABS(A1)*16,0)),(12*16))/16)&IF(MOD(INT(ROUND(ABS(A1)*16,0)),16)
=0,"","-")) & IF(MOD(INT(ROUND(ABS(A1)*16,0)),16)=0,"",TRIM(TEXT (MOD
(INT(ROUND(ABS(A1)*16,0)),(16))/16,"??/??"))) &""""))) & IF(OR
(A10,ROUND(ABS(A1)*16,0)=0),"",")")