ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculation with a Blank or 0 Cell (https://www.excelbanter.com/excel-discussion-misc-queries/446549-calculation-blank-0-cell.html)

Planko

Calculation with a Blank or 0 Cell
 
=IFERROR(('Page 1'!I45+'Page 1'!F45)/2,"N/A")

Hi all,

The above formula is what I need help with. I get the figure I want but the problem is that 'Page 1'!F45 might not have a percentage in it to calculate the total. So if I45 has 100% in it and F45 is 0%, or blank, then I get 50% for my total. I need it to say 100% if the second calculation is 0% or blank. The second calculation might not need to have anything in it to figure the numbers needed. If there is a calculation in F45 the formula works just fine.

Thanks for any help,

Planko

Spencer101

Quote:

Originally Posted by Planko (Post 1603550)
=IFERROR(('Page 1'!I45+'Page 1'!F45)/2,"N/A")

Hi all,

The above formula is what I need help with. I get the figure I want but the problem is that 'Page 1'!F45 might not have a percentage in it to calculate the total. So if I45 has 100% in it and F45 is 0%, or blank, then I get 50% for my total. I need it to say 100% if the second calculation is 0% or blank. The second calculation might not need to have anything in it to figure the numbers needed. If there is a calculation in F45 the formula works just fine.

Thanks for any help,

Planko


Hi Planko,

You need IF statements in there to do this. It would be easier to show you how if you could post an example workbook.

S.

Spencer101

Quote:

Originally Posted by Spencer101 (Post 1603551)
Hi Planko,

You need IF statements in there to do this. It would be easier to show you how if you could post an example workbook.

S.

Actually, scrap that. Give this a try....

=IFERROR(IF(OR(F45=0,F45=""),I45,('Page 1'!I45+'Page 1'!F45)/2),"N/A")

Does that do what you need?

Planko

2 Attachment(s)
Quote:

Originally Posted by Spencer101 (Post 1603552)
Actually, scrap that. Give this a try....

=IFERROR(IF(OR(F45=0,F45=""),I45,('Page 1'!I45+'Page 1'!F45)/2),"N/A")

Does that do what you need?

Thanks for the help so far but that did not work. I took a couple of screen shots. First one shows part of Page 1. Second shows the area the calculations go to. Using the formula you gave it put a zero in the cell.

Not sure if this helps you.

Planko

Spencer101

Quote:

Originally Posted by Planko (Post 1603557)
Thanks for the help so far but that did not work. I took a couple of screen shots. First one shows part of Page 1. Second shows the area the calculations go to. Using the formula you gave it put a zero in the cell.

Not sure if this helps you.

Planko


Could you post an actual Excel file? It would make things easier to understand.

If you don't wish to post it here, feel free to email it to the below email address.

punut AT gmail DOT com

(with no spaces and change the obvious for relevant symbols).

Claus Busch

Calculation with a Blank or 0 Cell
 
Hi Planko,

Am Thu, 12 Jul 2012 16:13:32 +0000 schrieb Planko:

=IFERROR(('Page 1'!I45+'Page 1'!F45)/2,"N/A")

Hi all,

The above formula is what I need help with. I get the figure I want but
the problem is that 'Page 1'!F45 might not have a percentage in it to
calculate the total. So if I45 has 100% in it and F45 is 0%, or blank,
then I get 50% for my total. I need it to say 100% if the second
calculation is 0% or blank. The second calculation might not need to
have anything in it to figure the numbers needed. If there is a
calculation in F45 the formula works just fine.


try:
=IF('Page 1'!F45=0,'Page 1'!I45,AVERAGE('Page 1'!F45,'Page 1'!I45))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Planko

Quote:

Originally Posted by Claus Busch (Post 1603576)
Hi Planko,

Am Thu, 12 Jul 2012 16:13:32 +0000 schrieb Planko:

=IFERROR(('Page 1'!I45+'Page 1'!F45)/2,"N/A")

Hi all,

The above formula is what I need help with. I get the figure I want but
the problem is that 'Page 1'!F45 might not have a percentage in it to
calculate the total. So if I45 has 100% in it and F45 is 0%, or blank,
then I get 50% for my total. I need it to say 100% if the second
calculation is 0% or blank. The second calculation might not need to
have anything in it to figure the numbers needed. If there is a
calculation in F45 the formula works just fine.


try:
=IF('Page 1'!F45=0,'Page 1'!I45,AVERAGE('Page 1'!F45,'Page 1'!I45))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Claus,

Thanks! That work perfectly. I really appreciate it.

Let say I had three columns now with the same formula. Maybe one or two columns out of the three had inputted information. The others do not.

I have tried myself and cannot figure it out.

Planko


All times are GMT +1. The time now is 11:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com