Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default IF and THEN statements

I'm currently working on a spreadsheet that is becoming more complicated in
formula needs than I can manage on my own. I was wondering if someone would
be kind enough to assist me with a solution on how to incorporate IF and THEN
statements.

Current Problem: I have this: #DIV/0! showing up in some of my cells
currently because there are no numbers to calculate. The results are
basically zero. However, I would like it to show that IF the formula results
in ZERO, THEN place a 0 instead of the #DIV/0! text in the cell. The
current formula in the cell is:

=SUM(L16/'2008'!G16

My Question: How do I use an IF and THEN statement with the above formula
to place a zero number in the cell if there are no numbers to calculate?

Thank you so much in advance for being a help to me.
--
Always Learning
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default IF and THEN statements

Hi,

Try this and note there's no need for SUM

=IF('2008'!G16<0,L16/'2008'!G16,0)

Mike

"Athena" wrote:

I'm currently working on a spreadsheet that is becoming more complicated in
formula needs than I can manage on my own. I was wondering if someone would
be kind enough to assist me with a solution on how to incorporate IF and THEN
statements.

Current Problem: I have this: #DIV/0! showing up in some of my cells
currently because there are no numbers to calculate. The results are
basically zero. However, I would like it to show that IF the formula results
in ZERO, THEN place a 0 instead of the #DIV/0! text in the cell. The
current formula in the cell is:

=SUM(L16/'2008'!G16

My Question: How do I use an IF and THEN statement with the above formula
to place a zero number in the cell if there are no numbers to calculate?

Thank you so much in advance for being a help to me.
--
Always Learning

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default IF and THEN statements

IF functions create routes for TRUE/FALSE outcomes. In your case, since
'2008'!G16 is the possible trouble maker, we'll check it first to determine
our outcome:

=IF('2008'!G16=0,0,L16/'2008'!G16)

Note that there is no need for the SUM function, as you are not actually
summing an array of numbers, but rather performing a single math operation.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Athena" wrote:

I'm currently working on a spreadsheet that is becoming more complicated in
formula needs than I can manage on my own. I was wondering if someone would
be kind enough to assist me with a solution on how to incorporate IF and THEN
statements.

Current Problem: I have this: #DIV/0! showing up in some of my cells
currently because there are no numbers to calculate. The results are
basically zero. However, I would like it to show that IF the formula results
in ZERO, THEN place a 0 instead of the #DIV/0! text in the cell. The
current formula in the cell is:

=SUM(L16/'2008'!G16

My Question: How do I use an IF and THEN statement with the above formula
to place a zero number in the cell if there are no numbers to calculate?

Thank you so much in advance for being a help to me.
--
Always Learning

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default IF and THEN statements

If you are just dividing two numbers, you don't need to use SUM. Your IF
formula should check the number by which you are dividing. If it's zero,
return zero; otherwise, go ahead and do the division.

=IF('2008'!G16=0,0,L16/'2008'!G16)

Hope this helps,

Hutch

"Athena" wrote:

I'm currently working on a spreadsheet that is becoming more complicated in
formula needs than I can manage on my own. I was wondering if someone would
be kind enough to assist me with a solution on how to incorporate IF and THEN
statements.

Current Problem: I have this: #DIV/0! showing up in some of my cells
currently because there are no numbers to calculate. The results are
basically zero. However, I would like it to show that IF the formula results
in ZERO, THEN place a 0 instead of the #DIV/0! text in the cell. The
current formula in the cell is:

=SUM(L16/'2008'!G16

My Question: How do I use an IF and THEN statement with the above formula
to place a zero number in the cell if there are no numbers to calculate?

Thank you so much in advance for being a help to me.
--
Always Learning

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default IF and THEN statements

Try it like this:

=IF('2008'!G16=0,0,L16/'2008'!G16)


--
Biff
Microsoft Excel MVP


"Athena" wrote in message
...
I'm currently working on a spreadsheet that is becoming more complicated
in
formula needs than I can manage on my own. I was wondering if someone
would
be kind enough to assist me with a solution on how to incorporate IF and
THEN
statements.

Current Problem: I have this: #DIV/0! showing up in some of my cells
currently because there are no numbers to calculate. The results are
basically zero. However, I would like it to show that IF the formula
results
in ZERO, THEN place a 0 instead of the #DIV/0! text in the cell. The
current formula in the cell is:

=SUM(L16/'2008'!G16

My Question: How do I use an IF and THEN statement with the above formula
to place a zero number in the cell if there are no numbers to calculate?

Thank you so much in advance for being a help to me.
--
Always Learning





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default IF and THEN statements

Let's start with =SUM(L16/'2008'!G16)
There is no need to use SUM when you are doing a simple math operation like
divide
This is what you need
=L16/'2008'!G16
We use SUM as in =SUM(A1:A100) to sum all the vlaues in a range

Now let's get that zero
=IF('2008'!G16=0, 0, L16/'2008'!G16)
or
=IF(ISERR(L16/'2008'!G16),0,L16/'2008'!G16)

But is zero really what you need? Maybe a cell that looks empty would be
better
=IF('2008'!G16=0, "" L16/'2008'!G16)
That is a pair of double-quotes with nothing between

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Athena" wrote in message
...
I'm currently working on a spreadsheet that is becoming more complicated
in
formula needs than I can manage on my own. I was wondering if someone
would
be kind enough to assist me with a solution on how to incorporate IF and
THEN
statements.

Current Problem: I have this: #DIV/0! showing up in some of my cells
currently because there are no numbers to calculate. The results are
basically zero. However, I would like it to show that IF the formula
results
in ZERO, THEN place a 0 instead of the #DIV/0! text in the cell. The
current formula in the cell is:

=SUM(L16/'2008'!G16

My Question: How do I use an IF and THEN statement with the above formula
to place a zero number in the cell if there are no numbers to calculate?

Thank you so much in advance for being a help to me.
--
Always Learning



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
if statements Peter[_12_] New Users to Excel 4 January 24th 09 12:34 AM
Help with IF statements JStiehl New Users to Excel 4 August 17th 08 11:54 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements help Smurphy New Users to Excel 2 February 6th 06 09:23 PM
IF statements Kinggops Excel Discussion (Misc queries) 4 December 2nd 05 10:32 PM


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