SOLVED

How do I divide by just the whole number and not the formula?

Copper Contributor

I am trying to divide 2 cells.  One cell is a number I put in and the other is calculating how many biweeks there are in between (=DATEDIF(A2,B2,"d")/14) so when I divide the number I wrote in by the number that is calculated by the formula it gives me the wrong number. What am I doing wrong?  If I divide D by C, E should equal $1880.46 but it is not.  Cell C is the one that has the above formula.excel.PNG

5 Replies

@Yayi_Chop07 

Since actually number of weeks returned is 18.07143

@Sergei Baklan is there a way to just have it dive by the integer and not the number with decimals?

best response confirmed by Yayi_Chop07 (Copper Contributor)
Solution

@Yayi_Chop07 

You may wrap it by ROUND() to round, or use INT() to cut decimals or similar functions - depends on how you'd like to calculate. As example

 =ROUND(DATEDIF(A2,B2,"d")/14,0) 

or more simple variant

 =ROUND( (B2-A2)/14,0) 

@Sergei Baklan  yes!!! You are correct, thank you so much!

1 best response

Accepted Solutions
best response confirmed by Yayi_Chop07 (Copper Contributor)
Solution

@Yayi_Chop07 

You may wrap it by ROUND() to round, or use INT() to cut decimals or similar functions - depends on how you'd like to calculate. As example

 =ROUND(DATEDIF(A2,B2,"d")/14,0) 

or more simple variant

 =ROUND( (B2-A2)/14,0) 

View solution in original post