Below is the code.
- The values in A:A is all set to general in the actual sheet (OTA) Need to change that to time format. IS there a way to get that done
Any help is appreciated I'm just starting out with VBA. Thanks in advance
Dim ws, ws2 As Worksheet
Dim LR As Long
Dim TimeAdd As String
'Delete the created sheet
TimeAdd = "00:15"
Application.DisplayAlerts = False
Worksheets("Data").Delete
Application.DisplayAlerts = True
'Setting up the sheet and copy the data to the sheet "Data"
Set ws = Sheets("OTA")
Sheets.Add.Name = "Data"
ws.Range("E:E").Copy Worksheets("Data").Range("A:A")
ws.Range("O:O").Copy Worksheets("Data").Range("B:B")
Worksheets("Data").Range("A:A").NumberFormat = "0000"
'Copying the formula thru the column "C"
Set ws2 = Sheets("Data")
LR = ws2.Range("B" & ws2.Rows.Count).End(xlUp).Row
ws2.Range("C2:C" & LR).Formula = "=B2+" & TimeAdd
End Sub'''