Formula work on certain number only,

Kenjiorson

New Member
Joined
Oct 25, 2023
Messages
16
Platform
  1. Windows
4 time.jpg



Will write down my formula here as i am not able to use the upload mini-sheet.

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.

Cell E1 - =Time(0,45,0)
Cell E2 - =Time(0,90,0)
Cell E5 - =IF($C5=1,$D5+$E$1,IF($C5=2,$D5+$E$2,$D5))
Thanks to GuzmanServices for the great help on cell E5 formula

It works on some cell like D7,
But D1 and D2 have issues

I tried out some number and it only work on whole number like,
eg 11pm, 3pm and 7pm.
If have hour and minutes, won't work. e.g 10.10am, 4.30pm and 7.05pm.

what formula should i edit or redo?

thanks in advance!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I believe that a time is not correctly captured in cells D5 and D6, apparently, from what you have in your image, you have text instead of a time.


Try:
Libro1
ABCDEF
1100:45:00
2201:30:00
3
4
5110:25 a. m.11:10 a. m.
6110:30 a. m.11:15 a. m.
7204:00 p. m.05:30 p. m.
Hoja1
Cell Formulas
RangeFormula
E5:E7E5=IF($C5=1,$D5+$E$1,IF($C5=2,$D5+$E$2,$D5))



With pleasure.
Dante Amor
 
Upvote 0
Solution
I agree with Dante.
Times are separated with a colon : not a full stop .
D5 and D6 is text.
D7 is also text, so E3 cannot contain that formula, it must also be text.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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