![]() |
multiple if statements
My if statement is as follows:
=if(and(a0,c0),((a*b)+(c*d))/e,(if(a=o,c*d/e,(if(c=0,a*b/e,""))))) It works fine for all of the conditions except for the case where none of the parameters are true. I want it to return a blank space, instead it is returning "value". I have tried substituting the blank space with a number or word and it still returns "value". Can anyone see the error. Thank you |
Without looking at what the formula is doing, i can see straight off that i
think you have put a=o instead of a=0. is this it? -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ------------------------------*------------------------------*---------------- It's easier to beg forgiveness than ask permission :-) ------------------------------*------------------------------*---------------- "ddepasquale" wrote in message ... My if statement is as follows: =if(and(a0,c0),((a*b)+(c*d))/e,(if(a=o,c*d/e,(if(c=0,a*b/e,""))))) It works fine for all of the conditions except for the case where none of the parameters are true. I want it to return a blank space, instead it is returning "value". I have tried substituting the blank space with a number or word and it still returns "value". Can anyone see the error. Thank you |
No, that was a typo. What the formula is trying to do is calculate a
weighted average of two sets of numbers, where if one of the numbers is zero or both are zero the formula still works. The reason I want a blank cell is that I use this value in another formula so I need it to be blank - not div/0. a=a number of values b=average of those values (a) c=a number of values d=average of those values (c) e=total number of values formula=weighted average of these two averages Thanks "Ken Wright" wrote: Without looking at what the formula is doing, i can see straight off that i think you have put a=o instead of a=0. is this it? -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ------------------------------Â*------------------------------Â*---------------- It's easier to beg forgiveness than ask permission :-) ------------------------------Â*------------------------------Â*---------------- "ddepasquale" wrote in message ... My if statement is as follows: =if(and(a0,c0),((a*b)+(c*d))/e,(if(a=0,c*d/e,(if(c=0,a*b/e,""))))) It works fine for all of the conditions except for the case where none of the parameters are true. I want it to return a blank space, instead it is returning "value". I have tried substituting the blank space with a number or word and it still returns "value". Can anyone see the error. Thank you |
Hi,
Take a look at the SUMPRODUCT function. Barring the interpretation of your variables (e.g. "a", "b", "c", etc.) this sounds like it may help. HTH -- Regards, Zack Barresse, aka firefytr "ddepasquale" wrote in message ... My if statement is as follows: =if(and(a0,c0),((a*b)+(c*d))/e,(if(a=o,c*d/e,(if(c=0,a*b/e,""))))) It works fine for all of the conditions except for the case where none of the parameters are true. I want it to return a blank space, instead it is returning "value". I have tried substituting the blank space with a number or word and it still returns "value". Can anyone see the error. Thank you |
All times are GMT +1. The time now is 07:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com