+ Reply to Thread
Results 1 to 9 of 9

Formatting a cell to display varying decimal places.

  1. #1
    JayE
    Guest

    Formatting a cell to display varying decimal places.

    I have a worksheet that in one column (B) I have a formula that pulls results
    from another column (D). The results in D range from 0 to 3.00. If the
    results in D are greater then 0 they are displayed in B. However if the
    reslut is 0, then nothing is to appear in B. Here is my formula in Column B
    Row 1 : =IF(D1>0,D1," ").

    Here is the problem, if the results in D1 are .0001 it needs to apear in B1
    as " .01% ( two decimal places). However, if the result in D1 is .000001,
    then the result should appear as .0001%. In other words, if the results in
    column D are >= to .0001, then they should appear as x.xx% in column B. If
    the rsults in column D are <= to .00009, then thyey should appear as x.xxxx%
    in column D.

    Can anyone give me a solution? Thanks.
    Jay




  2. #2
    Vasant Nanavati
    Guest

    Re: Formatting a cell to display varying decimal places.

    Format column B as Custom, 0.########%

    --

    Vasant

    "JayE" <[email protected]> wrote in message
    news:[email protected]...
    > I have a worksheet that in one column (B) I have a formula that pulls

    results
    > from another column (D). The results in D range from 0 to 3.00. If the
    > results in D are greater then 0 they are displayed in B. However if the
    > reslut is 0, then nothing is to appear in B. Here is my formula in Column

    B
    > Row 1 : =IF(D1>0,D1," ").
    >
    > Here is the problem, if the results in D1 are .0001 it needs to apear in

    B1
    > as " .01% ( two decimal places). However, if the result in D1 is

    ..000001,
    > then the result should appear as .0001%. In other words, if the results

    in
    > column D are >= to .0001, then they should appear as x.xx% in column B.

    If
    > the rsults in column D are <= to .00009, then thyey should appear as

    x.xxxx%
    > in column D.
    >
    > Can anyone give me a solution? Thanks.
    > Jay
    >
    >
    >




  3. #3
    JayE
    Guest

    Re: Formatting a cell to display varying decimal places.

    Vasant, thanks. However, unless I did something incorrectly my result in
    column B ranges from 0. to 0.0000. What I need is the following:

    If the result in column D is > or = to .0001 then the answer in Column B
    must be stated as 0.00%.

    If the result in column D is < the .0001 then the answer in column B must be
    stated as 0.0000%.

    Jay

    "Vasant Nanavati" wrote:

    > Format column B as Custom, 0.########%
    >
    > --
    >
    > Vasant
    >
    > "JayE" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have a worksheet that in one column (B) I have a formula that pulls

    > results
    > > from another column (D). The results in D range from 0 to 3.00. If the
    > > results in D are greater then 0 they are displayed in B. However if the
    > > reslut is 0, then nothing is to appear in B. Here is my formula in Column

    > B
    > > Row 1 : =IF(D1>0,D1," ").
    > >
    > > Here is the problem, if the results in D1 are .0001 it needs to apear in

    > B1
    > > as " .01% ( two decimal places). However, if the result in D1 is

    > ..000001,
    > > then the result should appear as .0001%. In other words, if the results

    > in
    > > column D are >= to .0001, then they should appear as x.xx% in column B.

    > If
    > > the rsults in column D are <= to .00009, then thyey should appear as

    > x.xxxx%
    > > in column D.
    > >
    > > Can anyone give me a solution? Thanks.
    > > Jay
    > >
    > >
    > >

    >
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    Re: Formatting a cell to display varying decimal places.

    Use a custom format like:
    [<=0]"";[<0.0001]0.0000%;0.00%;


    --
    Regards,
    Tom Ogilvy




    "JayE" <[email protected]> wrote in message
    news:[email protected]...
    > Vasant, thanks. However, unless I did something incorrectly my result in
    > column B ranges from 0. to 0.0000. What I need is the following:
    >
    > If the result in column D is > or = to .0001 then the answer in Column B
    > must be stated as 0.00%.
    >
    > If the result in column D is < the .0001 then the answer in column B must

    be
    > stated as 0.0000%.
    >
    > Jay
    >
    > "Vasant Nanavati" wrote:
    >
    > > Format column B as Custom, 0.########%
    > >
    > > --
    > >
    > > Vasant
    > >
    > > "JayE" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I have a worksheet that in one column (B) I have a formula that pulls

    > > results
    > > > from another column (D). The results in D range from 0 to 3.00. If

    the
    > > > results in D are greater then 0 they are displayed in B. However if

    the
    > > > reslut is 0, then nothing is to appear in B. Here is my formula in

    Column
    > > B
    > > > Row 1 : =IF(D1>0,D1," ").
    > > >
    > > > Here is the problem, if the results in D1 are .0001 it needs to apear

    in
    > > B1
    > > > as " .01% ( two decimal places). However, if the result in D1 is

    > > ..000001,
    > > > then the result should appear as .0001%. In other words, if the

    results
    > > in
    > > > column D are >= to .0001, then they should appear as x.xx% in column

    B.
    > > If
    > > > the rsults in column D are <= to .00009, then thyey should appear as

    > > x.xxxx%
    > > > in column D.
    > > >
    > > > Can anyone give me a solution? Thanks.
    > > > Jay
    > > >
    > > >
    > > >

    > >
    > >
    > >




  5. #5
    Vasant Nanavati
    Guest

    Re: Formatting a cell to display varying decimal places.

    Sorry; didn't read carefully enough. Try:

    =IF(D1<=0,"",IF(D1>=0.0001,TEXT(D1,"0.00%"),TEXT(D1,"0.0000%")))

    Keep in mind that these will be text strings and not numbers, so that they
    cannot be used directly in calculations. However, you can use VALUE(D1) in
    place of D1 for calculations.

    --

    Vasant




    "JayE" <[email protected]> wrote in message
    news:[email protected]...
    > Vasant, thanks. However, unless I did something incorrectly my result in
    > column B ranges from 0. to 0.0000. What I need is the following:
    >
    > If the result in column D is > or = to .0001 then the answer in Column B
    > must be stated as 0.00%.
    >
    > If the result in column D is < the .0001 then the answer in column B must

    be
    > stated as 0.0000%.
    >
    > Jay
    >
    > "Vasant Nanavati" wrote:
    >
    > > Format column B as Custom, 0.########%
    > >
    > > --
    > >
    > > Vasant
    > >
    > > "JayE" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I have a worksheet that in one column (B) I have a formula that pulls

    > > results
    > > > from another column (D). The results in D range from 0 to 3.00. If

    the
    > > > results in D are greater then 0 they are displayed in B. However if

    the
    > > > reslut is 0, then nothing is to appear in B. Here is my formula in

    Column
    > > B
    > > > Row 1 : =IF(D1>0,D1," ").
    > > >
    > > > Here is the problem, if the results in D1 are .0001 it needs to apear

    in
    > > B1
    > > > as " .01% ( two decimal places). However, if the result in D1 is

    > > ..000001,
    > > > then the result should appear as .0001%. In other words, if the

    results
    > > in
    > > > column D are >= to .0001, then they should appear as x.xx% in column

    B.
    > > If
    > > > the rsults in column D are <= to .00009, then thyey should appear as

    > > x.xxxx%
    > > > in column D.
    > > >
    > > > Can anyone give me a solution? Thanks.
    > > > Jay
    > > >
    > > >
    > > >

    > >
    > >
    > >




  6. #6
    Vasant Nanavati
    Guest

    Re: Formatting a cell to display varying decimal places.

    Nice one, Tom.

    Regards,

    Vasant

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Use a custom format like:
    > [<=0]"";[<0.0001]0.0000%;0.00%;
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    >
    > "JayE" <[email protected]> wrote in message
    > news:[email protected]...
    > > Vasant, thanks. However, unless I did something incorrectly my result in
    > > column B ranges from 0. to 0.0000. What I need is the following:
    > >
    > > If the result in column D is > or = to .0001 then the answer in Column B
    > > must be stated as 0.00%.
    > >
    > > If the result in column D is < the .0001 then the answer in column B

    must
    > be
    > > stated as 0.0000%.
    > >
    > > Jay
    > >
    > > "Vasant Nanavati" wrote:
    > >
    > > > Format column B as Custom, 0.########%
    > > >
    > > > --
    > > >
    > > > Vasant
    > > >
    > > > "JayE" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I have a worksheet that in one column (B) I have a formula that

    pulls
    > > > results
    > > > > from another column (D). The results in D range from 0 to 3.00. If

    > the
    > > > > results in D are greater then 0 they are displayed in B. However if

    > the
    > > > > reslut is 0, then nothing is to appear in B. Here is my formula in

    > Column
    > > > B
    > > > > Row 1 : =IF(D1>0,D1," ").
    > > > >
    > > > > Here is the problem, if the results in D1 are .0001 it needs to

    apear
    > in
    > > > B1
    > > > > as " .01% ( two decimal places). However, if the result in D1 is
    > > > ..000001,
    > > > > then the result should appear as .0001%. In other words, if the

    > results
    > > > in
    > > > > column D are >= to .0001, then they should appear as x.xx% in column

    > B.
    > > > If
    > > > > the rsults in column D are <= to .00009, then thyey should appear as
    > > > x.xxxx%
    > > > > in column D.
    > > > >
    > > > > Can anyone give me a solution? Thanks.
    > > > > Jay
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > > >

    >
    >




  7. #7
    Vasant Nanavati
    Guest

    Re: Formatting a cell to display varying decimal places.

    But needless to say, Tom's solution is much better :-).

    --

    Vasant

    "Vasant Nanavati" <vasantn *AT* aol *DOT* com> wrote in message
    news:[email protected]...
    > Sorry; didn't read carefully enough. Try:
    >
    > =IF(D1<=0,"",IF(D1>=0.0001,TEXT(D1,"0.00%"),TEXT(D1,"0.0000%")))
    >
    > Keep in mind that these will be text strings and not numbers, so that they
    > cannot be used directly in calculations. However, you can use VALUE(D1) in
    > place of D1 for calculations.
    >
    > --
    >
    > Vasant
    >
    >
    >
    >
    > "JayE" <[email protected]> wrote in message
    > news:[email protected]...
    > > Vasant, thanks. However, unless I did something incorrectly my result in
    > > column B ranges from 0. to 0.0000. What I need is the following:
    > >
    > > If the result in column D is > or = to .0001 then the answer in Column B
    > > must be stated as 0.00%.
    > >
    > > If the result in column D is < the .0001 then the answer in column B

    must
    > be
    > > stated as 0.0000%.
    > >
    > > Jay
    > >
    > > "Vasant Nanavati" wrote:
    > >
    > > > Format column B as Custom, 0.########%
    > > >
    > > > --
    > > >
    > > > Vasant
    > > >
    > > > "JayE" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I have a worksheet that in one column (B) I have a formula that

    pulls
    > > > results
    > > > > from another column (D). The results in D range from 0 to 3.00. If

    > the
    > > > > results in D are greater then 0 they are displayed in B. However if

    > the
    > > > > reslut is 0, then nothing is to appear in B. Here is my formula in

    > Column
    > > > B
    > > > > Row 1 : =IF(D1>0,D1," ").
    > > > >
    > > > > Here is the problem, if the results in D1 are .0001 it needs to

    apear
    > in
    > > > B1
    > > > > as " .01% ( two decimal places). However, if the result in D1 is
    > > > ..000001,
    > > > > then the result should appear as .0001%. In other words, if the

    > results
    > > > in
    > > > > column D are >= to .0001, then they should appear as x.xx% in column

    > B.
    > > > If
    > > > > the rsults in column D are <= to .00009, then thyey should appear as
    > > > x.xxxx%
    > > > > in column D.
    > > > >
    > > > > Can anyone give me a solution? Thanks.
    > > > > Jay
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > > >

    >
    >




  8. #8
    JayE
    Guest

    Re: Formatting a cell to display varying decimal places.

    Tom, thanks. It is working perfectly. Vasant,thanks as well, the result in
    B1 is for a label and no futher calculations would be necessary. Your
    solution would have worked fine.

    Jay
    "Vasant Nanavati" wrote:

    > But needless to say, Tom's solution is much better :-).
    >
    > --
    >
    > Vasant
    >
    > "Vasant Nanavati" <vasantn *AT* aol *DOT* com> wrote in message
    > news:[email protected]...
    > > Sorry; didn't read carefully enough. Try:
    > >
    > > =IF(D1<=0,"",IF(D1>=0.0001,TEXT(D1,"0.00%"),TEXT(D1,"0.0000%")))
    > >
    > > Keep in mind that these will be text strings and not numbers, so that they
    > > cannot be used directly in calculations. However, you can use VALUE(D1) in
    > > place of D1 for calculations.
    > >
    > > --
    > >
    > > Vasant
    > >
    > >
    > >
    > >
    > > "JayE" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Vasant, thanks. However, unless I did something incorrectly my result in
    > > > column B ranges from 0. to 0.0000. What I need is the following:
    > > >
    > > > If the result in column D is > or = to .0001 then the answer in Column B
    > > > must be stated as 0.00%.
    > > >
    > > > If the result in column D is < the .0001 then the answer in column B

    > must
    > > be
    > > > stated as 0.0000%.
    > > >
    > > > Jay
    > > >
    > > > "Vasant Nanavati" wrote:
    > > >
    > > > > Format column B as Custom, 0.########%
    > > > >
    > > > > --
    > > > >
    > > > > Vasant
    > > > >
    > > > > "JayE" <[email protected]> wrote in message
    > > > > news:[email protected]...
    > > > > > I have a worksheet that in one column (B) I have a formula that

    > pulls
    > > > > results
    > > > > > from another column (D). The results in D range from 0 to 3.00. If

    > > the
    > > > > > results in D are greater then 0 they are displayed in B. However if

    > > the
    > > > > > reslut is 0, then nothing is to appear in B. Here is my formula in

    > > Column
    > > > > B
    > > > > > Row 1 : =IF(D1>0,D1," ").
    > > > > >
    > > > > > Here is the problem, if the results in D1 are .0001 it needs to

    > apear
    > > in
    > > > > B1
    > > > > > as " .01% ( two decimal places). However, if the result in D1 is
    > > > > ..000001,
    > > > > > then the result should appear as .0001%. In other words, if the

    > > results
    > > > > in
    > > > > > column D are >= to .0001, then they should appear as x.xx% in column

    > > B.
    > > > > If
    > > > > > the rsults in column D are <= to .00009, then thyey should appear as
    > > > > x.xxxx%
    > > > > > in column D.
    > > > > >
    > > > > > Can anyone give me a solution? Thanks.
    > > > > > Jay
    > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > > >

    > >
    > >

    >
    >
    >


  9. #9
    Vasant Nanavati
    Guest

    Re: Formatting a cell to display varying decimal places.

    Thanks for the feedback, Jay; always appreciated!

    --

    Vasant

    "JayE" <[email protected]> wrote in message
    news:[email protected]...
    > Tom, thanks. It is working perfectly. Vasant,thanks as well, the result

    in
    > B1 is for a label and no futher calculations would be necessary. Your
    > solution would have worked fine.
    >
    > Jay
    > "Vasant Nanavati" wrote:
    >
    > > But needless to say, Tom's solution is much better :-).
    > >
    > > --
    > >
    > > Vasant
    > >
    > > "Vasant Nanavati" <vasantn *AT* aol *DOT* com> wrote in message
    > > news:[email protected]...
    > > > Sorry; didn't read carefully enough. Try:
    > > >
    > > > =IF(D1<=0,"",IF(D1>=0.0001,TEXT(D1,"0.00%"),TEXT(D1,"0.0000%")))
    > > >
    > > > Keep in mind that these will be text strings and not numbers, so that

    they
    > > > cannot be used directly in calculations. However, you can use

    VALUE(D1) in
    > > > place of D1 for calculations.
    > > >
    > > > --
    > > >
    > > > Vasant
    > > >
    > > >
    > > >
    > > >
    > > > "JayE" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > Vasant, thanks. However, unless I did something incorrectly my

    result in
    > > > > column B ranges from 0. to 0.0000. What I need is the following:
    > > > >
    > > > > If the result in column D is > or = to .0001 then the answer in

    Column B
    > > > > must be stated as 0.00%.
    > > > >
    > > > > If the result in column D is < the .0001 then the answer in column B

    > > must
    > > > be
    > > > > stated as 0.0000%.
    > > > >
    > > > > Jay
    > > > >
    > > > > "Vasant Nanavati" wrote:
    > > > >
    > > > > > Format column B as Custom, 0.########%
    > > > > >
    > > > > > --
    > > > > >
    > > > > > Vasant
    > > > > >
    > > > > > "JayE" <[email protected]> wrote in message
    > > > > > news:[email protected]...
    > > > > > > I have a worksheet that in one column (B) I have a formula that

    > > pulls
    > > > > > results
    > > > > > > from another column (D). The results in D range from 0 to 3.00.

    If
    > > > the
    > > > > > > results in D are greater then 0 they are displayed in B.

    However if
    > > > the
    > > > > > > reslut is 0, then nothing is to appear in B. Here is my formula

    in
    > > > Column
    > > > > > B
    > > > > > > Row 1 : =IF(D1>0,D1," ").
    > > > > > >
    > > > > > > Here is the problem, if the results in D1 are .0001 it needs to

    > > apear
    > > > in
    > > > > > B1
    > > > > > > as " .01% ( two decimal places). However, if the result in D1

    is
    > > > > > ..000001,
    > > > > > > then the result should appear as .0001%. In other words, if

    the
    > > > results
    > > > > > in
    > > > > > > column D are >= to .0001, then they should appear as x.xx% in

    column
    > > > B.
    > > > > > If
    > > > > > > the rsults in column D are <= to .00009, then thyey should

    appear as
    > > > > > x.xxxx%
    > > > > > > in column D.
    > > > > > >
    > > > > > > Can anyone give me a solution? Thanks.
    > > > > > > Jay
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1