hours and minute calculation

AJIESPEDAS

New Member
Joined
Jun 3, 2023
Messages
24
Office Version
  1. 2019
Platform
  1. MacOS
GOOD DAY ALL,
Here i have a problem need you guys help.
a) is it possible to have auto detect on date on column B so that if it changes month, it will automatically merge and put number for the current month as per picture below.
b) from the column e, can it calculate automatically the hours and minute and total up in column M8 as picture, with the column e with custom format cell 0#\:##
c) once all monthly total have been calculated, can it be sum to previous on column c2 to grand total on column I2.

i try before and it seems i cant get it to calculate correctly.

Please help!

regards,

AJIESPEDAS
Screenshot 2023-09-05 at 11.36.24 AM.png
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Please post XL2BB version of your workbook
XL2BB - Excel Range to BBCode

a) is it possible to have auto detect on date on column B so that if it changes month, it will automatically merge and put number for the current month as per picture below.
b) from the column e, can it calculate automatically the hours and minute and total up in column M8 as picture, with the column e with custom format cell 0#\:##
c) once all monthly total have been calculated, can it be sum to previous on column c2 to grand total on column I2.

a) Merging column A based on change of month would have to be done with a macro
b) That sounds like it's possible. That number format is odd. Waiting for XL2BB version
c) I'm not sure I understand where you want the formula and what you want summed

Jeff
 
Upvote 0
Please post XL2BB version of your workbook
XL2BB - Excel Range to BBCode



a) Merging column A based on change of month would have to be done with a macro
b) That sounds like it's possible. That number format is odd. Waiting for XL2BB version
c) I'm not sure I understand where you want the formula and what you want summed

Jeff
hi!, thanks for reply

i upload a picture again for you to understand..hopefully, and ill share a link for the file, is it okay?
the reason for (b) that number format is that to eliminate to always type the colon, so it will automatically colon the HHMM
i hope the picture will explain the (A) & (B)

this link:

Regards,
AJIESPEDAS
 

Attachments

  • Screenshot 2023-09-05 at 11.36.24 AM.png
    Screenshot 2023-09-05 at 11.36.24 AM.png
    59.7 KB · Views: 9
Upvote 0
May not be the exact solution, but Hope it helps
Book1
ABCD
1MonthDATEDAYMONTHLY TOTAL
2March3/7/202300:35 
3March3/21/202301:15 
4March3/23/202301:0002:50
5April4/7/202301:15 
6April4/7/202300:50 
7April4/8/202300:40 
8April4/9/202300:30 
9April4/10/202300:3503:50
10May5/1/202301:15 
11May5/5/202301:00 
12May5/10/202301:1503:30
13June6/1/202300:50 
14June6/21/202300:4001:30
Sheet2
Cell Formulas
RangeFormula
A2:A14A2=TEXT(VALUE(B2),"mmmm")
D2:D14D2=IF(AND(A2=A1,A2<>A3),SUMIF($A$2:$A$14,TEXT(VALUE(B2),"mmmm"),$C$2:$C$14),"")
 
Upvote 0
HI and thanks!,

im quite confuse using your formula, hopefully there is someone else that have an idea to help?
 
Upvote 0
im quite confuse using your formula
Are you saying that the formula is giving the results that you want but you don't understand how it works? The formula doesn't give the results you expected? Or something else?
 
Upvote 0
You can try a feature of Excel called Subtotal. Look at Data Subtotals; it will enter the totals and you could then reference the totals.

Initial tiny example
T202309a.xlsm
ABC
1MonthDATEDAY
2March01-Mar-202300:15:00
3March05-Mar-202300:15:00
4March20-Mar-202300:15:00
5April04-Apr-202300:15:00
6April05-Apr-202300:15:00
7April20-Apr-202300:15:00
8May20-May-202300:15:00
9May25-May-202300:15:00
10May30-May-202300:15:00
11
3c
Cell Formulas
RangeFormula
A2:A10A2=TEXT(B2,"mmmm")
C2:C10C2=TIME(0,15,0)


T202309a.xlsm
ABC
1MonthDATEDAY
5March Total00:45:00
9April Total00:45:00
13May Total00:45:00
14Grand Total02:15:00
3c
Cell Formulas
RangeFormula
C5,C9,C13C5=SUBTOTAL(9,C2:C4)
C14C14=SUBTOTAL(9,C2:C12)
 
Upvote 0
N.B. The forum provides a tool so you can post a concise extract of your sheet to the forum.
It is also useful if you provide the expected results.

Another suggestion that you can try is Sumifs.
You can paste the example to a clean sheet,
Click on the icon below the f(x) in the header. Move to your sheet and click on cell A1 and paste.

T202309a.xlsm
ABCDE
1Mar-202300:45:00
2Apr-202300:45:00
3May-202301:15:00
4MonthDATEDAY
5March01-Mar-202300:15:00
6March05-Mar-202300:15:00
7March20-Mar-202300:15:00
8April04-Apr-202300:15:00
9April05-Apr-202300:15:00
10April20-Apr-202300:15:00
11May20-May-202300:30:00
12May25-May-202300:15:00
13May30-May-202300:30:00
3c
Cell Formulas
RangeFormula
E1:E3E1=SUMIFS($C$5:$C$13,$B$5:$B$13,">="&D1,$B$5:$B$13,"<="&EOMONTH(D1,0))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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