time interval

earp_

Active Member
Joined
Apr 30, 2008
Messages
305
Hi I have this problem,
in cell A2 of sheet1 there is a timestamp in this format
12:00:00 PM
When cell A2 of sheet1 is between 12:00:00 and 12:59:59 I want to write 'hello' into another cell: A4 of sheet2

How does it work?

Thanks in advance
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Really thanks for all the support.
My last question is the follow one:
'7.05
If .Value >= TimeSerial(7, 0, 0) And .Value < TimeSerial(7, 5, 0) Then
With ThisWorkbook
Worksheets("Sheet1").Range("B2").Copy
Worksheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial xlValues
End With
End If
Now, I want to do things every 5 mins from 7AM to 7PM and every 5 mins I want to copy my values into a different column
I think is quite silly to write more than 100 IFs
How can I fix that with a for loop?
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

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