JavaScript is not enabled!...Please enable javascript in your browser

جافا سكريبت غير ممكن! ... الرجاء تفعيل الجافا سكريبت في متصفحك.

الصفحة الرئيسية

How to insert the date range in excel VBA


welcome back

In this article, we will discuss the Excel code to create your own timestamp

If you are working in a specific Excel sheet and want to include your timestamp in pm/am time format

Here is a very useful code

With this code, you can enter a time range sequentially from 00:00 to 23:00

Sub TimeStamp()

Dim i As Integer

For i = 1 To 24

ActiveCell.FormulaR1C1 = i & ":00"

ActiveCell.NumberFormat = "[$-409]h:mm AM/PM;@"

ActiveCell.Offset(RowOffset:=1, ColumnOffset:=0).Select

Next i

End Sub

الاسمبريد إلكترونيرسالة