ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If the Value in S is < to E round off to its Value (https://www.excelbanter.com/excel-programming/357323-if-value-s-e-round-off-its-value.html)

harishnehru

If the Value in S is < to E round off to its Value
 

Hello need help, please

I have a sheet which Cloumn S has formula (=J6+N6+R6).

In Column E I have shown Service Type A, B, or C. The value of A=28.00,
B=28.00, C=15.00. But the values is not shown in the sheet, we just show
Service type (typeA, typeB, or typeC).

Now I want to show in Column S if the value is less than its type, the
value should be rounded off to its type.

For e.g. Row6 ColumnE=TypeA, columnJ6=5, columnN6=7, columnR6=4, the
value in columnS =16. But I want to show columnS=28, because its typeA
and less than its type value. If the value is more than typeA in column
S then sum =J6+N6+R6.

Also need help if you reply with any programming to run in Excel for
this question, how to insert the program in Excel and and make it
working.

I hope I have made it clear.

Thank you very much in advance..


--
harishnehru
------------------------------------------------------------------------
harishnehru's Profile: http://www.excelforum.com/member.php...o&userid=32262
View this thread: http://www.excelforum.com/showthread...hreadid=527075


davesexcel[_85_]

If the Value in S is < to E round off to its Value
 

=IF(SUM(R6,N6,J6)<28,28,SUM(R6,N6,J6))
place this formula in cell S6


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=527075


Martin

If the Value in S is < to E round off to its Value
 
Can be done with the worksheet function IF, typed into first cell of column S
and then copied down (I'm assuming you're starting in the second row):

=IF(E2="TypeA",IF((J2+N2+R2)<=28,28,(J2+N2+R2)),IF (E2="TypeB",IF((J2+N2+R2)<=28,28,(J2+N2+R2)),IF(E2 ="TypeC",IF((J2+N2+R2)<=15,15,(J2+N2+R2)))))

Gets a bit complicated when so many IFs are nested but that should do the
trick!

"harishnehru" wrote:


Hello need help, please

I have a sheet which Cloumn S has formula (=J6+N6+R6).

In Column E I have shown Service Type A, B, or C. The value of A=28.00,
B=28.00, C=15.00. But the values is not shown in the sheet, we just show
Service type (typeA, typeB, or typeC).

Now I want to show in Column S if the value is less than its type, the
value should be rounded off to its type.

For e.g. Row6 ColumnE=TypeA, columnJ6=5, columnN6=7, columnR6=4, the
value in columnS =16. But I want to show columnS=28, because its typeA
and less than its type value. If the value is more than typeA in column
S then sum =J6+N6+R6.

Also need help if you reply with any programming to run in Excel for
this question, how to insert the program in Excel and and make it
working.

I hope I have made it clear.

Thank you very much in advance..


--
harishnehru
------------------------------------------------------------------------
harishnehru's Profile: http://www.excelforum.com/member.php...o&userid=32262
View this thread: http://www.excelforum.com/showthread...hreadid=527075



harishnehru[_2_]

If the Value in S is < to E round off to its Value
 

Thanks for both davesexcel and Martin.

Martin forumla was more what I needed. It worked fine.


--
harishnehru
------------------------------------------------------------------------
harishnehru's Profile: http://www.excelforum.com/member.php...o&userid=32262
View this thread: http://www.excelforum.com/showthread...hreadid=527075



All times are GMT +1. The time now is 09:51 AM.

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