Calculating Cumulative Time Issue Using A Command Button

skc751

New Member
Joined
Jun 9, 2011
Messages
1
Hi,

I hope everybody is doing fine. I have an issue with respect to calculating cumulating time for my spreadhseet.

The spreadsheet has Columns G, H and I with time values in the form 13:30:00 (24 hrs format). However, I only want to input Column G2 value (with G1 value being the label for the Column and don't want to include this one in my calculation), and H2 value (with H1 value being the label for the Column and it won't be included in calculation). After this, I only want to input subsequent Column H values. Also, I want to inherit Column I values into Column G like G3 should refer to H2, G4 should refer to H3 and so on.

Columns G, H and I on my spreadsheet may have multiple blank lines with no entries in them. So the code would need to include this into account before calculating or pre-populating. One hint to do the calculation would be to look for Column H values, and fetch corresponding Column G value and calculate Column I value from Columns G and H.

I have a Command Button to calculate the time. However, I don't know the code as I'm not a programmer.

Could someone please give me the code to do this that I can insert into the Command Button? Please help!

Wish y'all a nice morning/evening!

Regards,

Sumit.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,602
Messages
6,179,839
Members
452,948
Latest member
UsmanAli786

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