Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Fractional formatting

why does a cell return a decimal when text is linked in an "if statement"????
... the format of the cell is set to fractional.

This statement """=IF(G4=0,"",G4&"'' x")""": retuns (a decimal): I.E .375"
x -----
What I need the cell to return is: 3/8" x

if I i re-write it too: =if(G4=0,"",G4): it returns a fraction. I.E 3/8

HELP!!!! :(
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default Fractional formatting

If I put:
=if(G4=0,"",G4)
in a cell that has a general format, then I see 0.375 (with =3/8 in G4 and G4
formatted as a fraction).

If I format that cell with the formula as a fraction, then I'll see a fraction.

But your formula is returning text, so the numberformat doesn't really apply.

You could use something like:
=IF(G4=0,"",TEXT(G4,"0/0")&"'' x")
or
=IF(G4=0,"",TEXT(G4,"0/0")&""" x")
(if you want double quotes instead of two apostrophes)



Jim wrote:

why does a cell return a decimal when text is linked in an "if statement"????
.. the format of the cell is set to fractional.

This statement """=IF(G4=0,"",G4&"'' x")""": retuns (a decimal): I.E .375"
x -----
What I need the cell to return is: 3/8" x

if I i re-write it too: =if(G4=0,"",G4): it returns a fraction. I.E 3/8

HELP!!!! :(


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default Fractional formatting

=IF(G4=0,"",TEXT(G4,"# ?/?" &" x"))


Gord Dibben MS Excel MVP

On Sat, 25 Aug 2007 07:24:00 -0700, Jim wrote:

why does a cell return a decimal when text is linked in an "if statement"????
.. the format of the cell is set to fractional.

This statement """=IF(G4=0,"",G4&"'' x")""": retuns (a decimal): I.E .375"
x -----
What I need the cell to return is: 3/8" x

if I i re-write it too: =if(G4=0,"",G4): it returns a fraction. I.E 3/8

HELP!!!! :(


Reply
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
IPMT Function for fractional periods Woody13 Excel Discussion (Misc queries) 1 August 15th 06 07:53 PM
Fractional Workday Function Jeanette Excel Worksheet Functions 0 April 19th 06 06:54 PM
Lookup based on fractional value Ted Metro Excel Worksheet Functions 2 January 4th 06 08:38 PM
How to convert minutes to fractional hours Elara Excel Worksheet Functions 4 November 18th 05 10:30 PM
How can I convert fractional hours to minutes? Speck Teck Excel Discussion (Misc queries) 3 March 4th 05 12:18 AM


All times are GMT +1. The time now is 10:51 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"