Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Here is my If statement. I am getting an error message "too many arguments".
Can you tell me what I'm missing? =if(or(R4V3,S4<V3,),(if(and(R4=V3,S4V3),(yearfra c(V2-B4)*U4),if(R4=S4,T4*U4),if(and(R4<V3,S4=V3),(((C4-V1)/365)*U4),0)) Thanks in advance, |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I tried to decipher what you are meaning, but I can't tell where one IF
statement ends, and the next begins.... =if(or(R4V3,S4<V3,),(if(and(R4=V3,S4V3),(yearfra c(V2-B4)*U4),if(R4=S4,T4*U4),if(and(R4<V3,S4=V3),(((C4-V1)/365)*U4),0)) Might I suggest writing the formula inside out? in other words, writing your last IF statement first, then modifying it with the 2nd to last. For example: =IF(AND(R4<V3,S4=V3),((C4-V1)/365)*U4,0) : Note, this assumes that the ,0 is for this IF statement. Your statement is difficult to decipher if the ,0 is for this one, or for the original statement. Go Back to the statement, add the next IF statement outside of your first (which I 'think' your last IF statement is if your 2nd to last is negative.... =IF(R4=S4,T4-U4,last if statement) etc. If this doesn't help, let us know what conditions you are testing for, and what the result you want to be is. -- John C "plally" wrote: Here is my If statement. I am getting an error message "too many arguments". Can you tell me what I'm missing? =if(or(R4V3,S4<V3,),(if(and(R4=V3,S4V3),(yearfra c(V2-B4)*U4),if(R4=S4,T4*U4),if(and(R4<V3,S4=V3),(((C4-V1)/365)*U4),0)) Thanks in advance, |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
So, this is what I'm trying to do.
I'm trying to calculate premiums (PREM) for a given year (PREM YEAR) based on the policy issue date (EFF DATE) and policy termination date (TERM DATE). I also need to look at policy issue year (EFF YR) and policy termination year (TERM YR). All policies have an annual premium (ANN PREM). If the EFF YR PREM Year or TERM YR < PREM Year, Prem = 0 If EFF YR = PREM YEAR and TERM YR PREM Year, then perform the following Calculation: (((last day of prem yr - effective date)/365)*ANN PREM) If EFF YR = TERM YEAR, perform the following calculation: (((TERM DATE - EFF DATE)/365)/365*ANN PREM) If EFF YR < PREM Year and TERM YR = PREM Year, perform the following calculation: ((TERM DATE - day 1 of Prem Year)/365)*ANN PREM) my formula points to a cell that includes PREM YEAR, Day 1 of Prem Year and Last day of Prem Yr. Thanks for taking a look at this. "John C" wrote: I tried to decipher what you are meaning, but I can't tell where one IF statement ends, and the next begins.... =if(or(R4V3,S4<V3,),(if(and(R4=V3,S4V3),(yearfra c(V2-B4)*U4),if(R4=S4,T4*U4),if(and(R4<V3,S4=V3),(((C4-V1)/365)*U4),0)) Might I suggest writing the formula inside out? in other words, writing your last IF statement first, then modifying it with the 2nd to last. For example: =IF(AND(R4<V3,S4=V3),((C4-V1)/365)*U4,0) : Note, this assumes that the ,0 is for this IF statement. Your statement is difficult to decipher if the ,0 is for this one, or for the original statement. Go Back to the statement, add the next IF statement outside of your first (which I 'think' your last IF statement is if your 2nd to last is negative.... =IF(R4=S4,T4-U4,last if statement) etc. If this doesn't help, let us know what conditions you are testing for, and what the result you want to be is. -- John C "plally" wrote: Here is my If statement. I am getting an error message "too many arguments". Can you tell me what I'm missing? =if(or(R4V3,S4<V3,),(if(and(R4=V3,S4V3),(yearfra c(V2-B4)*U4),if(R4=S4,T4*U4),if(and(R4<V3,S4=V3),(((C4-V1)/365)*U4),0)) Thanks in advance, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Too many arguments for nested IFs | Excel Discussion (Misc queries) | |||
nested if still has too many arguments | Excel Discussion (Misc queries) | |||
3 level nested if has too many arguments ? | Excel Discussion (Misc queries) | |||
nested if statement returns #value error | Excel Discussion (Misc queries) | |||
Excel function LARGE returns error 'too few arguments' | Excel Worksheet Functions |