Hour function

vmjan02

Well-known Member
Joined
Aug 15, 2012
Messages
1,062
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
I have the in column A as time values and in column B i am using the hour function to get the hour from column A, but in some cases I am getting incorrect hour values

Ref the table below. (It is some samples) Any idea as how to get the correct values.

AHTHrs
6:03:056
1:47:051
47:15:1623
It has to be 47​
1:48:481
3:01:223
1:50:241
2:12:142
25:19:161
It has to be 25​
1:46:561
46:59:2422
It has to be 22​
1:49:241
30:08:426
It has to be 30​
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
The result is correct for the HOUR() funciton, 47:15:16 is 1 day, 23 hours, 15 minutes, 16 seconds.

To get the results that you want, try =INT(A2*24)
 
Upvote 0
Why does 46:59:24 have to be 22 when 30:08:42 has to be 30?
 
Upvote 0
yes, 46:59:24 need to be 46 as it is the total Hrs involved to solve the case. and same is with 30:08:42
 
Upvote 0
Then the formula jasonb75 posted should work for you.
 
Upvote 0

Forum statistics

Threads
1,215,497
Messages
6,125,155
Members
449,208
Latest member
emmac

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