Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default if formula with two sections

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?
  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default if formula with two sections

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default if formula with two sections

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a "0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?

  #4   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default if formula with two sections

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero befor
dividing and if not will give a zero.
"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a "0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default if formula with two sections

Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help

"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero befor
dividing and if not will give a zero.
"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a "0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default if formula with two sections

bj gave you a formula most recently for dealing with A2/A1.
If you are getting problems with A1/B1 did you replace bj's A1 references
with B1, and did you replace his A2 references with A1?
[Or otherwise, use bj's original formula which was written for A1/B1.]
Why not copy the formula you are using and paste it here?
You couldn't have got a #DIV/0 if you had used either of bj's formulae
appropriately.
--
David Biddulph

"Sande Leonardo" wrote in message
...
Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help


"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero
befor
dividing and if not will give a zero.


"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a
"0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that,
and leave
the number is there is a number?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default if formula with two sections

I copied BJ's formula and changed the A's and B's where I thought it would be
appropriate. Nothing I did to his formula gave me a normal answer.

The #DIV/0! is from my simple formula.

I thought it would be helpful if I showed what I was getting.

Below is BJ's formula and the first column is A1, the second column is B1
the third column is C1 - where the formula is.
I need C1 to show either the divided answer or a 0

75 1 =if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
75 1 75




"David Biddulph" wrote:

bj gave you a formula most recently for dealing with A2/A1.
If you are getting problems with A1/B1 did you replace bj's A1 references
with B1, and did you replace his A2 references with A1?
[Or otherwise, use bj's original formula which was written for A1/B1.]
Why not copy the formula you are using and paste it here?
You couldn't have got a #DIV/0 if you had used either of bj's formulae
appropriately.
--
David Biddulph

"Sande Leonardo" wrote in message
...
Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help


"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero
befor
dividing and if not will give a zero.


"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a
"0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that,
and leave
the number is there is a number?




  #8   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default if formula with two sections

I do not understand why you have the sum() portion of the equation.
Is this part of a bigger equation? If so please put the larger equation in
your response.
sum(A1/B1) or just A1/B1 will give a /0 error if B1 is 0
the simplest solution is to put
if(B1=0,0,A1/B1)
in place of A1/B1

"Sande Leonardo" wrote:

Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help

"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero befor
dividing and if not will give a zero.
"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a "0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default if formula with two sections

You'll have spotted (or Excel will have spotted for you) that bj's formula
had a missing parenthesis, so correct that to
=IF(AND(ISNUMBER(A1),ISNUMBER(A2)),IF(A1<0,A2/A1,0),0)

Now change A1 to B1, change A2 to A1.
Try it.
If you still get a divide by zero, copy the exact formula you are using and
paste it here.
--
David Biddulph

"Sande Leonardo" wrote in message
...
I copied BJ's formula and changed the A's and B's where I thought it would
be
appropriate. Nothing I did to his formula gave me a normal answer.

The #DIV/0! is from my simple formula.

I thought it would be helpful if I showed what I was getting.

Below is BJ's formula and the first column is A1, the second column is B1
the third column is C1 - where the formula is.
I need C1 to show either the divided answer or a 0

75 1 =if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
75 1 75


"David Biddulph" wrote:

bj gave you a formula most recently for dealing with A2/A1.
If you are getting problems with A1/B1 did you replace bj's A1 references
with B1, and did you replace his A2 references with A1?
[Or otherwise, use bj's original formula which was written for A1/B1.]
Why not copy the formula you are using and paste it here?
You couldn't have got a #DIV/0 if you had used either of bj's formulae
appropriately.
--
David Biddulph


"Sande Leonardo" wrote in
message
...
Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help


"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero
befor
dividing and if not will give a zero.


"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a
"0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if
that,
and leave
the number is there is a number?






  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default if formula with two sections

I put your formula if(B1=0,0,A1/B1) and it just sat there and did not give a
number.

Is there a way I can email you the excel file, so you can see this. It
seems so simple but we don't seem to be understanding each other. I know
it's proably me... but this is now a ventetta to make it work.

There is no larger equation. It is a simple division formula that produces
that #DIV/0 if the answer is 0 this is my whole formula =sum(A1/B1)

It works, it divides the two cells and produces a number.
Or it produces the #DIV/0 if the answer is zero.

I tried pasting the excel into this but that didn't work.


  #11   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default if formula with two sections

did you have = in front of the equation?
if you copied the equation and pasted it , it may have formated itself as
text,
check the format cell that it is general
select the cell and highlite the "=" replace it with another =

Seems strange, but sometimes works.


"Sande Leonardo" wrote:

I put your formula if(B1=0,0,A1/B1) and it just sat there and did not give a
number.

Is there a way I can email you the excel file, so you can see this. It
seems so simple but we don't seem to be understanding each other. I know
it's proably me... but this is now a ventetta to make it work.

There is no larger equation. It is a simple division formula that produces
that #DIV/0 if the answer is 0 this is my whole formula =sum(A1/B1)

It works, it divides the two cells and produces a number.
Or it produces the #DIV/0 if the answer is zero.

I tried pasting the excel into this but that didn't work.

  #12   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default if formula with two sections

Mia culpa, most of the time I check the formula in Excel.
I got lazy this time and didn't.
thanks for finding it.

"David Biddulph" wrote:

You'll have spotted (or Excel will have spotted for you) that bj's formula
had a missing parenthesis, so correct that to
=IF(AND(ISNUMBER(A1),ISNUMBER(A2)),IF(A1<0,A2/A1,0),0)

Now change A1 to B1, change A2 to A1.
Try it.
If you still get a divide by zero, copy the exact formula you are using and
paste it here.
--
David Biddulph

"Sande Leonardo" wrote in message
...
I copied BJ's formula and changed the A's and B's where I thought it would
be
appropriate. Nothing I did to his formula gave me a normal answer.

The #DIV/0! is from my simple formula.

I thought it would be helpful if I showed what I was getting.

Below is BJ's formula and the first column is A1, the second column is B1
the third column is C1 - where the formula is.
I need C1 to show either the divided answer or a 0

75 1 =if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
75 1 75


"David Biddulph" wrote:

bj gave you a formula most recently for dealing with A2/A1.
If you are getting problems with A1/B1 did you replace bj's A1 references
with B1, and did you replace his A2 references with A1?
[Or otherwise, use bj's original formula which was written for A1/B1.]
Why not copy the formula you are using and paste it here?
You couldn't have got a #DIV/0 if you had used either of bj's formulae
appropriately.
--
David Biddulph


"Sande Leonardo" wrote in
message
...
Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help

"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero
befor
dividing and if not will give a zero.

"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a
"0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if
that,
and leave
the number is there is a number?






  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default if formula with two sections

just used a pop up error for research-- this is what fixed my problem
It gave me what ever I typed in, I chose the word "zero" - just for fun

here is the formula that worked - =IF(B2=0,"zero",A2/B2)

Told you this was a vendetta ... and I want to thank you for trying so hard
to help me. It was only through your help and some tweeking that I
accomplished my task.

Again thank you!!!!
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
Sorting by Sections Problem Freshman Excel Worksheet Functions 7 October 5th 06 02:26 AM
Subtotaling sections is the same list steev_jd Excel Discussion (Misc queries) 0 July 25th 06 02:34 PM
Totaling sections within a list steev_jd Excel Discussion (Misc queries) 1 July 7th 06 11:29 AM
print spreadsheet in 5 sections....how to? Scudo New Users to Excel 3 October 18th 05 09:10 PM
Need one formula for large sections of one column, but.... construction_secretary Excel Discussion (Misc queries) 2 June 10th 05 02:18 PM


All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"