Apr 14 2021 11:26 PM
I have setup a spreadsheet to monitor my staff's holiday hours. I have formatted the cells using [h]:mm and also used the 1904 date system.
My problem is that, when trying to multiply the hours by the number of days taken, e.g. 10hrs 46mins by 2 I get a Value message in the cell. I formula I use is (A3 equals 10:46) =A3*2, can anyone advise me of the correct formula to use? Any assistance would be gratefully received.
Apr 15 2021 12:09 AM
Please read this information. It is of great help to you and everyone who would like to help.
https://techcommunity.microsoft.com/t5/excel/welcome-to-your-excel-discussion-space/m-p/2204395
Then, if I may recommend you, add a file (without sensitive data) and explain exactly what your plan is.
Thank you for your understanding and patience.
Nikolino
Apr 15 2021 02:57 AM
In general it works
Perhaps you have text somewhere. Better if you could provide simple sample file to check.
Apr 15 2021 01:37 PM
I am using an Acer Aspire 5 laptop running Windows 10 version 20H2, Microsoft Office 2016.
I have setup a spreadsheet to monitor my staff's leave allocation, deduct the appropriate hours and show the balance remaining. As an example please see the following.
Staff member has been allocated 134:26 hours leave. He wishes to take some leave, days between Monday and
Saturday work out at 10hrs 46 mins and a Sunday at 10hrs 18mins. In cell F7 I want to multiply the number of days,
D7 etc, by 10:46 and in cell G8, the numbert of days by 10:18. When I do this I get the #VALUE message.
Finally, the total taken will be deducted from J4 with the balance shown in J22.
Apr 15 2021 02:01 PM
Thank you for the file. Excel doesn't recognize @10:46 in, thus an error
=IF(B7=0," ",D7*@10:46)
You may use
=IF(B7=0," ",D7*"10:46")
or more reliable
=IF(B8=0," ",D8*TIME(11,47,0))
Apr 15 2021 02:16 PM
Apr 16 2021 04:08 AM
SolutionTIME() function requires all 3 parameters, you can't miss seconds. Please check TIME function - Office Support (microsoft.com)
Apr 16 2021 12:30 PM
Apr 16 2021 12:53 PM
@Baz286 , you are welcome, glad to help
Jul 22 2021 07:54 AM
Hello again,
May I seek your advice once again regarding calculating hours and minutes.
I have been taking your advice regarding calculating time however, on addition, it does not calculate properly.
I am using Windows 10 Pro, Excel 2016.
I have attached a file showing my calculations. I would welcome your advice on adapti g the correct formula.
Regards,
Barry Nelson
Jul 22 2021 10:23 AM
Barry, formulas looks correct, I'd only not to hardcode constants like TIME(10,46,0) and keep then in separate cells somewhere outside. Otherwise you need to correct every formula if the constant changes.
Sure, everything in Excel could be done by few different ways. Stay on formulas you are more familiar with if they give correct results.
Aug 24 2023 07:56 AM
@Sergei BaklanI am trying to do something similar. I want to calculate the total time to assemble
19 pcs * :45 minutes each unit
How do I get it to display correctly?
Windows 11 Pro
Version 22H2
Office 365
Version 2307 Build16626.20170
Aug 24 2023 08:05 AM
In Excel datetimes are actually numbers where days are integer part of the number and time is decimal one. One day is equal to 1.
Thus 1 hour = 1/24
1 minute =1/24/60
etc
45 min will be 45/24/60. Multiply on 19, totally =19*45/24/60 and apply time format. It returns 14:15:00.
Aug 24 2023 08:39 AM
Aug 24 2023 09:09 AM
It looks like in M13 you have text which looks like a time, not the time actually (which shall be a number). Could you please check with formulae as
what do they return. If the same what are possible variants for such texts.
Aug 24 2023 09:44 AM
It is as you say:
TRUE=ISTEXT(M13)
#VALUE=TIMEVALUE(M13)
I've had some luck with my own formulas if they come back with an even hour. It doesn't like fractions of an hour or minutes.
Aug 24 2023 10:20 AM
When we need to convert texts to numbers first. Variants could be
=C13 *
IF(
SEARCH(":", M13) - 1,
LEFT(M13, SEARCH(":", M13) - 1) / 24 +
MID(M13, SEARCH(":", M13) + 1, 5) / 24 / 60,
MID(M13, SEARCH(":", M13) + 1, 5) / 24 / 60
)
or if you are on 365
=C13 *
MMULT(
IFERROR(TEXTSPLIT(M13, ":") + 0, 0),
VSTACK(1 / 24, 1 / 24 / 60)
)
or something like that
Aug 24 2023 10:29 AM
Aug 24 2023 10:33 AM
Aug 24 2023 10:42 AM
Apr 16 2021 04:08 AM
SolutionTIME() function requires all 3 parameters, you can't miss seconds. Please check TIME function - Office Support (microsoft.com)