Hi all,
I am looking for a little bit of help with a problem I am having. I am developing worksheet for the purpose of calculating Short Rate earned premiums. I have the majority of what I need figured out but I am haveing some trouble with the IF function. What I am trying for is something like:
IF(C4=D4,70,0)
But for some reason the fuction won't work for me with "=", i can get it to work with ">=" or "<=" but if I use "=" it continues to come up false even when its true. Any insight would certainly be appreciated. Thanks.
![]()
Last edited by will.osmond; 08-29-2009 at 06:52 PM. Reason: Solved
Welcome to the forum.
C4 and D4 are not exactly equal.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Thanks for the welcome!
I should have been more specific, its the value of cells c4 and d4 that should equal. And like I said it would work perfectly if i wanted it to be based on be greater then or less then but if the true or false is based on the values equaling then it always comes up false.
I haven't seen your cells C4 and D4.
If the values were exactly equal, the formula would operate as you expect.
Enter the same number in both cells and try it.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Ah ok well that was a little dense of me. I now understand the problem, the number being generated is a fraction, and even if I have the format set to show a whole number the IF function still sees the fraction and therefor the two can't be equal. It makes sense but also makes this more complicated. Is there anyway to get around that?
I'll explain in a litte more detail what I'm trying to do and hopefully you can point me in the right direction. I'm trying to create a form which will calculate earned insurance premiums based on a short rate table. This table determins the amount earned based on how many days into the policy term the cancellation is. I figured out how to calculate the number of days easily enough with the YEARFRAC function but as I said this generates a fraction. I take the fraction, multiply it by 365 to get the days. But because the number generated is not a whole number it makes it impossible to use the IF function to automaticly determine the % to be used. I'm stuck as to how to get around this problem without having to put in a field for the agents to reenter the generated whole number on the form. That works but its a little bit of an ackward way of doing it. Is there any way to get the generated day to be treated as a whole number?
Can you create example workbook and upload it?
As far I see you'll need round function (wich can give you rounded numbers) but more likely lookup function. But I'm not allowed by law to read people's mind so some example with desired inputs and outputs would be nice![]()
"Relax. What is mind? No matter. What is matter? Never mind!"
You can round one or the other (or both) to the nearest whole number:
=IF(ROUND(C4,0) = D4, 70, 0)
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Can you please make thread [solved]?
"Relax. What is mind? No matter. What is matter? Never mind!"
Ty
Be free to post new questions![]()
"Relax. What is mind? No matter. What is matter? Never mind!"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks