H
hensleyj
Hey everyone, new here.
I have been busting my head for the last 2 days trying to get this I
statement to work and really need someones help.
Basically, the principle is....2 logicals need to be performed, if i
comes up true, perform a calculation; if false, a differen
calculation.
Below is what i have which works.
=IF(OR(AND($O$10="Prefix D3 or D4 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="Pre 01/08/2005 (Weekl
Benefit)",(I4>0)),$O$8/7*F4-J4-0.01,$O$7/7*F4-J4-0.01),
IF(AND($O$10="01/08/2005 to 31/07/2006 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01))
However $0$10 is a list of product types as follows;
Prefix D3 or D4 (30 Day Benefit)
Pre 01/08/2005 (Weekly Benefit)
01/08/2005 to 31/07/2006 (30 Day Benefit)
01/08/2006 to 31/07/2009 (Monthly Benefit)
01/08/2009 to Present (30 Day Benefit)
July 2007 (30 Day Benefit)
So i need to repeat the same code above, only altering the $0$10 logica
to each of the above products. However when i introduce a 4th I
statement i get a "too many arguments" error.
So the complete Statement (below) is what i need to get working, but i
doesnt
=IF(OR(AND($O$10="Prefix D3 or D4 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="Pre 01/08/2005 (Weekl
Benefit)",(I4>0)),$O$8/7*F4-J4-0.01,$O$7/7*F4-J4-0.01),
IF(AND($O$10="01/08/2005 to 31/07/2006 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="01/08/2006 to 31/07/2009 (Monthl
Benefit)",(I4>0)),$O$8*12/365*F4-J4-0.01,$O$7*12/365-F4-J4-0.01),
IF(AND($O$10="01/08/2009 to Present (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="July 2007 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01))))))
Broken down;
=IF($0$10="Prefix D3 or D4 (30 Day Benefit)"
AND
=IF(I4>0
If True, Perform: $O$8/30*F4-J4
If False, Perform: $O$7/30*F4-J4
And repeat for each of these.
Prefix D3 or D4 (30 Day Benefit)
Pre 01/08/2005 (Weekly Benefit)
01/08/2005 to 31/07/2006 (30 Day Benefit)
01/08/2006 to 31/07/2009 (Monthly Benefit)
01/08/2009 to Present (30 Day Benefit)
July 2007 (30 Day Benefit)
I have attached a copy of the sheet, with the relevant colum
highlighted in red. As you can see, the formula works for 3 statement
perfectly; but it rejects anymore.
If anyone has any ideas ....you would be doing be a big favor.
If you can show me how to do the whole code to get them all to work;
would be greatly appreciative... i am at my wits end!!
+-------------------------------------------------------------------
|Filename: sheet1.JPG
|Download: http://www.excelbanter.com/attachment.php?attachmentid=327
+-------------------------------------------------------------------
I have been busting my head for the last 2 days trying to get this I
statement to work and really need someones help.
Basically, the principle is....2 logicals need to be performed, if i
comes up true, perform a calculation; if false, a differen
calculation.
Below is what i have which works.
=IF(OR(AND($O$10="Prefix D3 or D4 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="Pre 01/08/2005 (Weekl
Benefit)",(I4>0)),$O$8/7*F4-J4-0.01,$O$7/7*F4-J4-0.01),
IF(AND($O$10="01/08/2005 to 31/07/2006 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01))
However $0$10 is a list of product types as follows;
Prefix D3 or D4 (30 Day Benefit)
Pre 01/08/2005 (Weekly Benefit)
01/08/2005 to 31/07/2006 (30 Day Benefit)
01/08/2006 to 31/07/2009 (Monthly Benefit)
01/08/2009 to Present (30 Day Benefit)
July 2007 (30 Day Benefit)
So i need to repeat the same code above, only altering the $0$10 logica
to each of the above products. However when i introduce a 4th I
statement i get a "too many arguments" error.
So the complete Statement (below) is what i need to get working, but i
doesnt
=IF(OR(AND($O$10="Prefix D3 or D4 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="Pre 01/08/2005 (Weekl
Benefit)",(I4>0)),$O$8/7*F4-J4-0.01,$O$7/7*F4-J4-0.01),
IF(AND($O$10="01/08/2005 to 31/07/2006 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="01/08/2006 to 31/07/2009 (Monthl
Benefit)",(I4>0)),$O$8*12/365*F4-J4-0.01,$O$7*12/365-F4-J4-0.01),
IF(AND($O$10="01/08/2009 to Present (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01),
IF(AND($O$10="July 2007 (30 Da
Benefit)",(I4>0)),$O$8/30*F4-J4-0.01,$O$7/30*F4-J4-0.01))))))
Broken down;
=IF($0$10="Prefix D3 or D4 (30 Day Benefit)"
AND
=IF(I4>0
If True, Perform: $O$8/30*F4-J4
If False, Perform: $O$7/30*F4-J4
And repeat for each of these.
Prefix D3 or D4 (30 Day Benefit)
Pre 01/08/2005 (Weekly Benefit)
01/08/2005 to 31/07/2006 (30 Day Benefit)
01/08/2006 to 31/07/2009 (Monthly Benefit)
01/08/2009 to Present (30 Day Benefit)
July 2007 (30 Day Benefit)
I have attached a copy of the sheet, with the relevant colum
highlighted in red. As you can see, the formula works for 3 statement
perfectly; but it rejects anymore.
If anyone has any ideas ....you would be doing be a big favor.
If you can show me how to do the whole code to get them all to work;
would be greatly appreciative... i am at my wits end!!
+-------------------------------------------------------------------
|Filename: sheet1.JPG
|Download: http://www.excelbanter.com/attachment.php?attachmentid=327
+-------------------------------------------------------------------