ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Then formula (https://www.excelbanter.com/excel-worksheet-functions/79232-if-then-formula.html)

Oskar

If Then formula
 

Greetings Oracle’s of Excel;

I am stumped. I an attempting to simply round up and round down based
on a decimal.

A whole number value is placed in (E2) now in (E3) I want to: Divide
(E2) by 7, If decimal remainder is .3 or less round down, if .4 or more
round up.

Thanks in advance Sages of Excel.


John


--
Oskar
------------------------------------------------------------------------
Oskar's Profile: http://www.excelforum.com/member.php...o&userid=32745
View this thread: http://www.excelforum.com/showthread...hreadid=525775


Peo Sjoblom

If Then formula
 
=CEILING((E1/7)-0.3,1)


--

Regards,

Peo Sjoblom


"Oskar" wrote in
message ...

Greetings Oracle's of Excel;

I am stumped. I an attempting to simply round up and round down based
on a decimal.

A whole number value is placed in (E2) now in (E3) I want to: Divide
(E2) by 7, If decimal remainder is .3 or less round down, if .4 or more
round up.

Thanks in advance Sages of Excel.


John


--
Oskar
------------------------------------------------------------------------
Oskar's Profile:
http://www.excelforum.com/member.php...o&userid=32745
View this thread: http://www.excelforum.com/showthread...hreadid=525775




Cutter

If Then formula
 

Try something like this:

=IF(E2<"",IF(MOD(E2,7)3,INT(E2/7)+1,INT(E2/7)),"")

Note in your original question that you have not allowed for anything
between .3 and .4


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=525775


Gary L Brown

If Then formula
 
E3:
=IF(((E2/7)-INT(E2/7))=0.4,ROUNDUP(E2/7,0),ROUNDDOWN(E2/7,0))

HTH,
--
Gary Brown

If this post was helpful, please click the ''Yes'' button next to ''Was this
Post Helpfull to you?''.


"Oskar" wrote:


Greetings Oracles of Excel;

I am stumped. I an attempting to simply round up and round down based
on a decimal.

A whole number value is placed in (E2) now in (E3) I want to: Divide
(E2) by 7, If decimal remainder is .3 or less round down, if .4 or more
round up.

Thanks in advance Sages of Excel.


John


--
Oskar
------------------------------------------------------------------------
Oskar's Profile:
http://www.excelforum.com/member.php...o&userid=32745
View this thread: http://www.excelforum.com/showthread...hreadid=525775



Oskar

If Then formula
 

Thanks Gary... works great


--
Oskar
------------------------------------------------------------------------
Oskar's Profile: http://www.excelforum.com/member.php...o&userid=32745
View this thread: http://www.excelforum.com/showthread...hreadid=525775



All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com