How to add minutes in specific cell based on what i input

Kenjiorson

New Member
Joined
Oct 25, 2023
Messages
16
Platform
  1. Windows
Cell E5 auto add minutes from cell D5 when cell C5 input either 1 or 2.
1 is auto add 45 minutes and 2 is 90 minutes, 1 formula is in cell E1 and 2 is in cell E2.
What formula/function to input in E5?
Thank you

3 time sheet.jpg
 
If you need different values for S1 and S2, you can enter them into H1 and H2 as needed.

2023-11-20.xlsx
BCDEFGHIJ
1100:45:00S101:00:00
2201:30:00S201:30:00
3
4
5122:00 AM3:30 AM16090$160
6212:00 AM2:45 AM
73S12:00 AM3:00 AM
84S22:00 AM3:30 AM
9512:00 AM2:45 AM
106S22:00 AM3:30 AM
11722:00 AM3:30 AM
128S12:00 AM3:00 AM
139
1410
15
16
Sheet3
Cell Formulas
RangeFormula
E5:E12E5=IF($C5=$D$1,$D5+$E$1,IF($C5=$D$2,$D5+$E$2,IF($C5=$G$1,$D5+$H$1,IF($C5=$G$2,$D5+$H$2,$D5))))
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Thank you for the revised screenshot. My interpretation of the desired result for I4 is:
Excel Formula:
=IF($C5=1,$D5+$E$1,IF($C5=2,$D5+$E$2,IF($C5="S1",$D5+$H$1,IF($C5="S2",$D5+$H$2))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,198
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top