Forum Discussion
Difference between two same calculations
Hello,
I'm a bit confused why Excel is giving me a total for two calculations that are exactly the same.
I have one calculation based on the "DatedIf" argument of 22 weeks between two dates as the dividing factor for an annual goal of $421,875 resulting in the amount of $19,428.45.
(=datedif(start date cell,end date cell,"d")/7=22, $421875/22)
I have another calculation (first done on a calculator) but formulated based the simple math argument using 22 weeks as the dividing factor or an annual goal of $421,875 resulting in the amount o $19,176.14 (which is the correct amount corresponding to the calculator result), ($421,875/22). I've attached the file showing the difference.
Can someone please assist on the reason why there is this discrepancey? I need for the "datedif"argument version to be correct because it's needed in a workbook I've created for prorating goals.
You can try ROUNDUP. DATEDIF returns 152 days which are 21,714... weeks. ROUNDUP returns weeks without decimals.
=ROUNDUP(DATEDIF(B9,B10,"d")/7,0)
6 Replies
- SergeiBaklanDiamond Contributor
If you count weeks from the beginning of Start one to the end of last one, number of weeks could be calculated as
=WEEKNUM(B10,21)-WEEKNUM(B9,21) +1Second parameter depends on calendar you use.
- Michael1105Brass ContributorThank you for your reply. I greatly appreciate the time you've taken to answer.
- SergeiBaklanDiamond Contributor
Michael1105 , you are welcome
- OliverScheurichGold Contributor
You can try ROUNDUP. DATEDIF returns 152 days which are 21,714... weeks. ROUNDUP returns weeks without decimals.
=ROUNDUP(DATEDIF(B9,B10,"d")/7,0)- Michael1105Brass Contributor
Thank you.. This worked perfectly!
- OliverScheurichGold Contributor
You are welcome.