VBA Solution to do a -4:00 hour GMT time calculate on imported Data in two Colums for all imported rows

smd747

Board Regular
Joined
Apr 24, 2011
Messages
214
The code below imports and formats my data. What I need to do is the values in the following Columns need I need to add a calculation to adjust for GMT Time -4 currently.
The column with the original Arrival Time Date is Q imported to the I column
The column with the original Departure Time Date is T imported to the J column.
Do I need to create a Loop to recalculate ? I attempted to
Code:
Range("I" & Row).Value = .Range("Q" & i).Value - 4
            Range("J" & Row).Value = .Range("T" & i).Value  -4

From both sides but it did not work.

Here is all my code that works but does not calculate the GMT -4

Code:
Option Explicit

Sub FormatCustomerDeliveryData()

Dim i                   As Long
Dim j                   As Long
Dim D                   As Long
Dim Row                 As Long
Dim StartRow            As Long
Dim LastRow             As Long
Dim FinalRow            As Long
Dim cell                As Range
Dim Highlight           As Boolean
Dim Prompt              As String
Dim Path                As String
Dim Data()              As String
Dim StartTime           As Date
Dim start_dt            As Date
Dim end_dt              As Date
Dim WkbData             As Workbook
Dim WSReport            As Worksheet

    Prompt = "Select the file to process."
    Path = Application.GetOpenFilename("Excel Files (*.xls*), *.xls*", , Prompt)
    If Path = "False" Then
        GoTo ExitSub:
    End If

    Application.DisplayAlerts = False
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    
    Set WkbData = Workbooks.Open(Filename:=Path, ReadOnly:=True)
    Workbooks.Add (1)
    
    ' Set Up Colunm Headers
    
     ActiveSheet.Name = "Customer Deliveries Report"
    Range("A1").Value = "Route Date"
    Range("B1").Value = "Vehicle Description"
    Range("C1").Value = "Order No"
    Range("D1").Value = "Stop No"
    Range("E1").Value = "Customer"
    Range("F1").Value = "Town"
    Range("G1").Value = "Zip Code"
    Range("H1").Value = "Driver"
    Range("I1").Value = "Arrival"
    Range("J1").Value = "Departure"
    Range("L1").Value = "Distance"
    Range("K1").Value = "Stop Duration"
    Range("M1").Value = "TWI Open Time"
    Range("N1").Value = "TWI Close Time"
        
    'Format Row Headers
    
    Range("A1").EntireRow.HorizontalAlignment = xlCenter
    Range("A1").EntireRow.VerticalAlignment = xlCenter
    Range("A1").EntireRow.Font.Bold = True
    Range("A1").EntireRow.WrapText = True
    Cells.Font.Name = "Arial"
    Cells.Font.Size = 8
    
    Range("A:A").EntireColumn.ColumnWidth = 10
    Range("B:B").EntireColumn.ColumnWidth = 20
    Range("C:C").EntireColumn.ColumnWidth = 12
    Range("D:D").EntireColumn.ColumnWidth = 10
    Range("E:E").EntireColumn.ColumnWidth = 36
    Range("F:F").EntireColumn.ColumnWidth = 16
    Range("G:G").EntireColumn.ColumnWidth = 10
    Range("H:H").EntireColumn.ColumnWidth = 25
    Range("I:I").EntireColumn.ColumnWidth = 14
    Range("J:J").EntireColumn.ColumnWidth = 14
    Range("K:K").EntireColumn.ColumnWidth = 14
    Range("L:L").EntireColumn.ColumnWidth = 16
    Range("M:M").EntireColumn.ColumnWidth = 14
    Range("N:N").EntireColumn.ColumnWidth = 14
    
    

''''''''''''''''''''''''''''    'Format Colunms

    Range("I:J").NumberFormat = "h\:mm AM/PM"
    Range("L:L").NumberFormat = "0.00"
    Range("M:N").NumberFormat = "h\:mm AM/PM"
    Range("K:K").NumberFormat = "[h]:mm"
    
    
    Range("A1:N1").Interior.Color = RGB(141, 180, 226)
        
    Call AddBorders(Range("A1:n1"))
    
    Range("A2").Select
    ActiveWindow.FreezePanes = True
    ActiveWindow.DisplayGridlines = True
    
'*************************************************************
            
    With WkbData.Sheets(1)
        LastRow = .Range("A" & .Rows.Count).End(xlUp).Row


        FrmProgress.TextBoxProgress.Width = 0
        FrmProgress.LabelPrompt.Caption = "Processing Data: "
        FrmProgress.LabelTimeRemaining.Caption = "Time Remaining: Calculating"
        FrmProgress.TextBoxDummy.SetFocus
        FrmProgress.Show vbModeless
        DoEvents
''''''''''''
        Row = 1
        StartRow = Row
        StartTime = Now
        For i = 4 To LastRow
            FrmProgress.TextBoxProgress.Width = (i / LastRow) * 200
            FrmProgress.LabelPrompt.Caption = "Processing Data: " & i & " of " & LastRow
            FrmProgress.LabelTimeRemaining.Caption = "Time Remaining: " & IIf(i < 50, "Calculating", Format(((Now - StartTime) / i) * LastRow - (Now - StartTime), "h:mm:ss"))
            DoEvents
                Row = Row + 1
' FIRST RANGE SHEET BEING IMPORTED TO, 2ND RANGE EXPORTED FROM
            Range("A" & Row).Value = .Range("A" & i).Value
            Range("B" & Row).Value = .Range("B" & i).Value
            Range("C" & Row).Value = .Range("D" & i).Value
            Range("D" & Row).Value = .Range("E" & i).Value
            Range("E" & Row).Value = .Range("F" & i).Value
            Range("F" & Row).Value = .Range("J" & i).Value
            Range("G" & Row).Value = .Range("L" & i).Value
            Range("H" & Row).Value = .Range("N" & i).Value
            Range("I" & Row).Value = .Range("Q" & i).Value  ''***Need to take this value and adjust to GMT Time -4  (4:00 formatted [H]:MM)
            Range("J" & Row).Value = .Range("T" & i).Value  ''***Need to take this value and adjust to GMT Time -4  (4:00 formatted [H]:MM)  
            Range("L" & Row).Value = .Range("W" & i).Value
            Range("M" & Row).Value = .Range("AB" & i).Value
            Range("N" & Row).Value = .Range("AC" & i).Value

            ' Range K is a calculated field

        Next i
    End With
    
    '*Close Imported Data WorkBook
    
    WkbData.Close SaveChanges:=False
    
    'Continue Cleaning Up
    
'    FinalRow = Cells(Rows.Count, 1).End(xlUp).Row
' For i = 2 To FinalRow
'            Data = Split(Replace(Range("A" & i).Value, "]", "", , , vbTextCompare), "[", , vbTextCompare)
'            Range("A" & i).Value = Trim(Data(0))
'            Range("B" & i).Value = Trim(Data(1))
'        Next i
'
'  For i = 2 To FinalRow
'            Data = Split(Replace(Range("C" & i).Value, "]", "", , , vbTextCompare), "[", , vbTextCompare)
'            Range("C" & i).Value = Trim(Data(0))
'            Range("D" & i).Value = Trim(Data(1))
'        Next i
'
        

    'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    On Error Resume Next


Cells(2, 11).Select
Do
    If IsEmpty(ActiveCell) Then
        If IsEmpty(ActiveCell.Offset(0, -1)) Then
            ActiveCell.Value = ""
        Else
            ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]"

ActiveCell.Value = ActiveCell.Value
        End If
    End If
    ActiveCell.Offset(1, 0).Select
    Loop Until IsEmpty(ActiveCell.Offset(0, -1))

Cells(2, 11).Select

    Range("A:A").EntireColumn.HorizontalAlignment = xlCenter
    Range("C:D").EntireColumn.HorizontalAlignment = xlCenter
    Range("G:G").EntireColumn.HorizontalAlignment = xlCenter
    Range("I:L").EntireColumn.HorizontalAlignment = xlCenter
    Range("M:N").EntireColumn.HorizontalAlignment = xlCenter


'*********************************************************************************

'Dim cell As Range
   
    For Each cell In Range("B:B").SpecialCells(xlCellTypeConstants)
        If cell Like "Route ID*" Then
               cell.Value = Trim(Mid(cell.Value, InStr(cell.Value, "-") + 1))
        End If
    Next cell
    
  Cells(2, 4).Select
      
'################################--Adjust drivers stops per address
  ' This loop runs as long as there is something in the next column
    Do While Not IsEmpty(ActiveCell.Offset(0, 1))
    ActiveCell.FormulaR1C1 = "=IF(EXACT(RC[1],R[-1]C[1]),0,1)"
    ActiveCell.Offset(1, 0).Select
    Loop
     Cells(2, 4).Select
Range("D:D").EntireColumn.Value = Range("D:D").EntireColumn.Value

ExitSub:

    Application.DisplayAlerts = True
    Application.EnableEvents = True
    Application.ScreenUpdating = True

End Sub


Here is what I am attempting:
Customer Deliveries Report

ABCDEFGHIJKLMNO
Customer-1NEW YORKBrian
Customer-2NEW YORKBrian
Customer-3NEW YORKBrian
Customer-4NEW YORKBrian

<COLGROUP> <COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 93px"><COL style="WIDTH: 110px"><COL style="WIDTH: 110px"><COL style="WIDTH: 93px"><COL style="WIDTH: 60px"><COL style="WIDTH: 60px"><COL style="WIDTH: 93px"><COL style="WIDTH: 38px"><COL style="WIDTH: 74px"><COL style="WIDTH: 70px"><COL style="WIDTH: 78px"><COL style="WIDTH: 52px"><COL style="WIDTH: 86px"><COL style="WIDTH: 89px"><COL style="WIDTH: 80px"> </COLGROUP><TBODY>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="align: center"]Column I need to subtract 4:00 hours from each Row[/TD]
[TD="align: center"]Column J need to subtract 4:00 hours from each Row[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="bgcolor: #99ccff, align: center"]Route Date[/TD]
[TD="bgcolor: #99ccff, align: center"]Vehicle Description[/TD]
[TD="bgcolor: #99ccff, align: center"]Order No[/TD]
[TD="bgcolor: #99ccff, align: center"]Stop No[/TD]
[TD="bgcolor: #99ccff, align: center"]Customer[/TD]
[TD="bgcolor: #99ccff, align: center"]Town[/TD]
[TD="bgcolor: #99ccff, align: center"]Zip Code[/TD]
[TD="bgcolor: #99ccff, align: center"]Driver[/TD]
[TD="bgcolor: #99ccff, align: center"]Arrival[/TD]
[TD="bgcolor: #99ccff, align: center"]Departure[/TD]
[TD="bgcolor: #99ccff, align: center"]Stop Duration[/TD]
[TD="bgcolor: #99ccff, align: center"]Distance[/TD]
[TD="bgcolor: #99ccff, align: center"]TWI Open Time[/TD]
[TD="bgcolor: #99ccff, align: center"]TWI Close Time[/TD]
[TD="bgcolor: #99ccff, align: center"]Sales Amount[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]10/3/2012[/TD]
[TD="align: right"]303[/TD]
[TD="align: center"]754[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]10011[/TD]

[TD="align: center"]10:26 AM[/TD]
[TD="align: center"]11:08 AM[/TD]
[TD="align: center"]0:42[/TD]
[TD="align: center"]56.75[/TD]
[TD="align: center"]11:00 AM[/TD]
[TD="align: center"]12:00 PM[/TD]
[TD="align: right"]$314.58[/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]10/3/2012[/TD]
[TD="align: right"]303[/TD]
[TD="align: center"]748[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]10001[/TD]

[TD="align: center"]12:09 PM[/TD]
[TD="align: center"]12:44 PM[/TD]
[TD="align: center"]0:35[/TD]
[TD="align: center"]4.54[/TD]
[TD="align: center"]12:00 PM[/TD]
[TD="align: center"]1:00 PM[/TD]
[TD="align: right"]$2,306.00[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]10/3/2012[/TD]
[TD="align: right"]303[/TD]
[TD="align: center"]754[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]10001[/TD]

[TD="align: center"]1:15 PM[/TD]
[TD="align: center"]1:25 PM[/TD]
[TD="align: center"]0:10[/TD]
[TD="align: center"]4.37[/TD]
[TD="align: center"]1:00 PM[/TD]
[TD="align: center"]2:00 PM[/TD]
[TD="align: right"]$123.10[/TD]

[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]10/3/2012[/TD]
[TD="align: right"]303[/TD]
[TD="align: center"]751[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]10013[/TD]

[TD="align: center"]1:51 PM[/TD]
[TD="align: center"]3:18 PM[/TD]
[TD="align: center"]1:26[/TD]
[TD="align: center"]5.36[/TD]
[TD="align: center"]11:00 AM[/TD]
[TD="align: center"]3:00 PM[/TD]
[TD="align: right"]$1,689.40[/TD]

[TD="bgcolor: #cacaca, align: center"]9[/TD]

[TD="bgcolor: #cacaca, align: center"]10[/TD]

[TD="bgcolor: #cacaca, align: center"]11[/TD]

</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4

Any idea's and direction to accomplish this calculation would be appreciated
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
You need to deduct 4 hours not 4 days. Here is an example which allows for times before 4:00AM:

Code:
Sub Deduct4Hours()
    Dim i As Long
    For i = 5 To 8
        With Range("I" & i)
            .Value = 1 + Range("Q" & i).Value - TimeValue("04:00")
            If .Value > 1 Then .Value = .Value - 1
        End With
    Next i
End Sub

By the way it's best to avoid giving variables names that are already used by VBA, eg Row.
 
Upvote 0
Thanks Andrew for the direction, What's your suggestion for placement of the code? This is the where the data gets imported to Range("I" & Row).Value = This is the imported source data sheet with this .Range("Q" & i).Value - 4
should I run this code after the import to change the value? Bute i see you reference Q The sample above with excel Jennie is the finish formated import. I only import columns I need.

Thanks again for your help
 
Upvote 0
No I was not. I am still working with the concept of the code loop. I also tried it as is and this was the result:

Customer Deliveries Report


ABCDEFGHIJKLMNOPQ
Customer-1NEW YORKBrian
Customer-2NEW YORKBrian
Customer-3NEW YORKBrian
Customer-4NEW YORKBrian


<colgroup>
<col style="width: 30px; font-weight: bold;">
<col style="width: 97px;">
<col style="width: 114px;">
<col style="width: 115px;">
<col style="width: 97px;">
<col style="width: 63px;">
<col style="width: 63px;">
<col style="width: 97px;">
<col style="width: 40px;">
<col style="width: 77px;">
<col style="width: 73px;">
<col style="width: 81px;">
<col style="width: 54px;">
<col style="width: 90px;">
<col style="width: 93px;">
<col style="width: 84px;">
<col style="width: 80px;">
<col style="width: 80px;"></colgroup>
<tbody>


[TD="bgcolor: #CACACA, align: center"]1[/TD]

[TD="bgcolor: #99CCFF, align: center"]Route
Date[/TD]

[TD="bgcolor: #99CCFF, align: center"]Vehicle
Description[/TD]

[TD="bgcolor: #99CCFF, align: center"]Order
No[/TD]

[TD="bgcolor: #99CCFF, align: center"]Stop
No[/TD]

[TD="bgcolor: #99CCFF, align: center"]Customer[/TD]

[TD="bgcolor: #99CCFF, align: center"]Town[/TD]

[TD="bgcolor: #99CCFF, align: center"]Zip
Code[/TD]

[TD="bgcolor: #99CCFF, align: center"]Driver[/TD]

[TD="bgcolor: #99CCFF, align: center"]Arrival[/TD]

[TD="bgcolor: #99CCFF, align: center"]Departure[/TD]

[TD="bgcolor: #99CCFF, align: center"]Stop
Duration[/TD]

[TD="bgcolor: #99CCFF, align: center"]Distance[/TD]

[TD="bgcolor: #99CCFF, align: center"]TWI
Open Time[/TD]

[TD="bgcolor: #99CCFF, align: center"]TWI
Close Time[/TD]

[TD="bgcolor: #99CCFF, align: center"]Sales
Amount[/TD]



[TD="bgcolor: #CACACA, align: center"]2[/TD]

[TD="align: center"]10/3/2012[/TD]

[TD="align: right"]303[/TD]

[TD="align: center"]754[/TD]

[TD="align: center"]1[/TD]



[TD="align: center"]10011[/TD]



[TD="align: center"]8:00 PM[/TD]

[TD="align: center"]11:08 AM[/TD]

[TD="align: center"]0:42[/TD]

[TD="align: center"]56.75[/TD]

[TD="align: center"]11:00 AM[/TD]

[TD="align: center"]12:00 PM[/TD]

[TD="align: right"]$314.58[/TD]



[TD="bgcolor: #CACACA, align: center"]3[/TD]

[TD="align: center"]10/3/2012[/TD]

[TD="align: right"]303[/TD]

[TD="align: center"]748[/TD]

[TD="align: center"]1[/TD]



[TD="align: center"]10001[/TD]



[TD="align: center"]8:00 PM[/TD]

[TD="align: center"]12:44 PM[/TD]

[TD="align: center"]0:35[/TD]

[TD="align: center"]4.54[/TD]

[TD="align: center"]12:00 PM[/TD]

[TD="align: center"]1:00 PM[/TD]

[TD="align: right"]$2,306.00[/TD]



[TD="bgcolor: #CACACA, align: center"]4[/TD]

[TD="align: center"]10/3/2012[/TD]

[TD="align: right"]303[/TD]

[TD="align: center"]754[/TD]

[TD="align: center"]1[/TD]



[TD="align: center"]10001[/TD]



[TD="align: center"]8:00 PM[/TD]

[TD="align: center"]1:25 PM[/TD]

[TD="align: center"]0:10[/TD]

[TD="align: center"]4.37[/TD]

[TD="align: center"]1:00 PM[/TD]

[TD="align: center"]2:00 PM[/TD]

[TD="align: right"]$123.10[/TD]



[TD="bgcolor: #CACACA, align: center"]5[/TD]

[TD="align: center"]10/3/2012[/TD]

[TD="align: right"]303[/TD]

[TD="align: center"]751[/TD]

[TD="align: center"]1[/TD]



[TD="align: center"]10013[/TD]



[TD="align: center"]8:00 PM[/TD]

[TD="align: center"]3:18 PM[/TD]

[TD="align: center"]1:26[/TD]

[TD="align: center"]5.36[/TD]

[TD="align: center"]11:00 AM[/TD]

[TD="align: center"]3:00 PM[/TD]

[TD="align: right"]$1,689.40[/TD]



[TD="bgcolor: #CACACA, align: center"]6[/TD]



[TD="align: center"]8:00 PM[/TD]



[TD="bgcolor: #CACACA, align: center"]7[/TD]



[TD="align: center"]8:00 PM[/TD]



[TD="bgcolor: #CACACA, align: center"]8[/TD]



[TD="align: center"]8:00 PM[/TD]



[TD="bgcolor: #CACACA, align: center"]9[/TD]



[TD="bgcolor: #CACACA, align: center"]10[/TD]


</tbody>


Excel
tables to the web >>
Excel Jeanie
HTML 4
 
Upvote 0
I am working on tring to add the code during import, but times not caculation right:

Code:
' FIRST RANGE SHEET BEING IMPORTED TO, 2ND RANGE EXPORTED FROM
            Range("A" & Row).Value = .Range("A" & i).Value
            Range("B" & Row).Value = .Range("B" & i).Value
            Range("C" & Row).Value = .Range("D" & i).Value
            Range("D" & Row).Value = .Range("E" & i).Value
            Range("E" & Row).Value = .Range("F" & i).Value
            Range("F" & Row).Value = .Range("J" & i).Value
            Range("G" & Row).Value = .Range("L" & i).Value
            Range("H" & Row).Value = .Range("N" & i).Value
            Range("I" & Row).Value = .Range("Q" & i).Value
            Range("J" & Row).Value = .Range("T" & i).Value
            Range("L" & Row).Value = .Range("W" & i).Value
            Range("M" & Row).Value = .Range("AB" & i).Value
            Range("N" & Row).Value = .Range("AC" & i).Value
            ' Range K is a calculated field
        Next i
        
'ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
    Dim i As Long
    For i = 2 To LastRow
        With Range("I" & i)
            .Value = 1 + Range("Q" & i).Value - TimeValue("04:00")
            If .Value > 1 Then .Value = .Value - 1
        End With
    Next i
    End With
'ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
 
Upvote 0
The code I posted demonstrates how to deduct 4 hours from each cell in a loop. Adjust the loop to suit.

I am not getting it, and can not adapt the code. Everytime I apply it and at all pointsin the code I places that I apply the loop, all times turn into 8:00 PM

Thanks for your wisdom and time, but it did not help me.

Thanks
 
Upvote 0
I tired the code on both the raw data input:Which the time Data is coming from and has to have 4:00 deducted.

Here is the raw data The time is in Q

Sheet1


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
AA
AB
AC
AD
AE
AF
AG
AH
AI
AJ
AK

<tbody>
[TD="bgcolor: #CACACA, align: center"]1
[/TD]
[TD="align: left"]Route Date
[/TD]
[TD="align: left"]Route Description
[/TD]
[TD="align: left"]Location Id
[/TD]
[TD="align: left"]Order #
[/TD]
[TD="align: left"]Stop #
[/TD]
[TD="align: left"]Description
[/TD]
[TD="align: left"]Addr Line 1
[/TD]
[TD="align: left"]Addr line 2
[/TD]
[TD="align: left"]Planned Stop
[/TD]
[TD="align: left"]Town
[/TD]
[TD="align: left"]St
[/TD]
[TD="align: left"]Zip
[/TD]
[TD="align: left"]Phone
[/TD]
[TD="align: left"]Driver
[/TD]
[TD="align: left"]Planned Arrival
[/TD]
[TD="align: left"]Projected Arrival
[/TD]
[TD="bgcolor: #FFFF00, align: left"]Actual Arrival
[/TD]
[TD="bgcolor: #FFFF00, align: left"]Plan Departure
[/TD]
[TD="align: left"]Projected Departure
[/TD]
[TD="align: left"]Actual Departure
[/TD]
[TD="align: left"]Planned Distance
[/TD]
[TD="align: left"]Projected Distance
[/TD]
[TD="align: left"]Actual Distance
[/TD]
[TD="align: left"]Delay Type
[/TD]
[TD="align: left"]Delay Minutes
[/TD]
[TD="align: left"]Open Time
[/TD]
[TD="align: left"]Close time
[/TD]
[TD="align: left"]TW1 Open Time
[/TD]
[TD="align: left"]TW1 Close Time
[/TD]
[TD="align: left"]Instructions
[/TD]
[TD="align: left"]Bill
[/TD]
[TD="align: left"]Pay
[/TD]
[TD="align: left"]Load ID
[/TD]
[TD="align: left"]Date Modified
[/TD]
[TD="align: left"]Zone
[/TD]
[TD="align: right"]Sales Amount
[/TD]

[TD="bgcolor: #CACACA, align: center"]2
[/TD]

[TD="bgcolor: #CACACA, align: center"]3
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100178430001
[/TD]
[TD="align: left"]75471331
[/TD]
[TD="align: left"]Stop 1
[/TD]
[TD="align: left"]Customer1
[/TD]
[TD="align: left"]242 WEST 20TH ST
[/TD]
[TD="align: left"]BETWEEN 7TH & 8TH AV
[/TD]
[TD="align: left"]1
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10011
[/TD]
[TD="align: left"]2129891320
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]10:26 AM
[/TD]
[TD="align: left"]10:03 AM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]57.94
[/TD]
[TD="align: right"]57.94
[/TD]
[TD="align: right"]56.75
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]DEL WED SHOP
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]1
[/TD]
[TD="align: right"]314.58
[/TD]

[TD="bgcolor: #CACACA, align: center"]4
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100178430269
[/TD]
[TD="align: left"]75475721
[/TD]
[TD="align: left"]Stop 2
[/TD]
[TD="align: left"]Customer2
[/TD]
[TD="align: left"]101 BARCLAY STREET
[/TD]
[TD="align: left"]FRT ON MURRAY ST X W
[/TD]
[TD="align: left"]2
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10007
[/TD]
[TD="align: left"]2129891320
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]11:45 AM
[/TD]
[TD="align: left"]10:42 AM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]2.27
[/TD]
[TD="align: right"]2.27
[/TD]
[TD="align: right"]3.03
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]3:00 PM
[/TD]
[TD="align: left"]DEL WED 7:30AM TAG-GROUND
FLOOR
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]84.16
[/TD]

[TD="bgcolor: #CACACA, align: center"]5
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100178430269
[/TD]
[TD="align: left"]75475831
[/TD]
[TD="align: left"]Stop 2
[/TD]
[TD="align: left"]Customer3
[/TD]
[TD="align: left"]101 BARCLAY STREET
[/TD]
[TD="align: left"]FRT ON MURRAY ST X W
[/TD]
[TD="align: left"]2
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10007
[/TD]
[TD="align: left"]2129891320
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]11:45 AM
[/TD]
[TD="align: left"]10:42 AM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]2.27
[/TD]
[TD="align: right"]2.27
[/TD]
[TD="align: right"]3.03
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]3:00 PM
[/TD]
[TD="align: left"]DEL WED 7:30AM TAG-GROUND
FLOOR
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]127.17
[/TD]

[TD="bgcolor: #CACACA, align: center"]6
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100208950002
[/TD]
[TD="align: left"]74844361
[/TD]
[TD="align: left"]Stop 3
[/TD]
[TD="align: left"]Customer4
[/TD]
[TD="align: left"]7-PENN PLAZA
[/TD]
[TD="align: left"]MADISON SQUARE GARDE
[/TD]
[TD="align: left"]3
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10001
[/TD]
[TD="align: left"]5167405900
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]12:09 PM
[/TD]
[TD="align: left"]11:23 AM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]3.33
[/TD]
[TD="align: right"]3.33
[/TD]
[TD="align: right"]4.54
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]1:00 PM
[/TD]
[TD="align: left"]DELIVER TO SITE WEDNESDAY
AM
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]1
[/TD]
[TD="align: right"]2,306.00
[/TD]

[TD="bgcolor: #CACACA, align: center"]7
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100208950003
[/TD]
[TD="align: left"]73385091
[/TD]
[TD="align: left"]Stop 4
[/TD]
[TD="align: left"]Customer5
[/TD]
[TD="align: left"]7 PENN PLAZA
[/TD]
[TD="align: left"]MADISON SQUARE GARDE
[/TD]
[TD="align: left"]4
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10001
[/TD]
[TD="align: left"]5167405900
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]12:45 PM
[/TD]
[TD="align: left"]11:23 AM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]0.00
[/TD]
[TD="align: right"]0.00
[/TD]
[TD="align: right"]0.00
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]7:00 PM
[/TD]
[TD="align: left"]DELIVER TO SITE WEDNESDAY
AM
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]1
[/TD]
[TD="align: right"]1,440.00
[/TD]

[TD="bgcolor: #CACACA, align: center"]8
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100208950017
[/TD]
[TD="align: left"]75474311
[/TD]
[TD="align: left"]Stop 5
[/TD]
[TD="align: left"]Customer6
[/TD]
[TD="align: left"]7 PENN PLAZA
[/TD]
[TD="align: left"]MADISON SQUARE GARDE
[/TD]
[TD="align: left"]5
[/TD]
[TD="align: left"]NYC
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10001
[/TD]
[TD="align: left"]5167405900
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]12:45 PM
[/TD]
[TD="align: left"]11:23 AM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]0.00
[/TD]
[TD="align: right"]0.00
[/TD]
[TD="align: right"]0.02
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]7:00 PM
[/TD]
[TD="align: left"]DELIVER TO SITE WEDNESDAY
AM
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]2,001.00
[/TD]

[TD="bgcolor: #CACACA, align: center"]9
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100142900014
[/TD]
[TD="align: left"]75456911
[/TD]
[TD="align: left"]Stop 6
[/TD]
[TD="align: left"]Customer7
[/TD]
[TD="align: left"]110 LEROY STREET
[/TD]
[TD="align: left"]C/S GREENWICH & HUDS
[/TD]
[TD="align: left"]6
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10001
[/TD]
[TD="align: left"]2128746400
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]1:15 PM
[/TD]
[TD="align: left"]12:01 PM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]1.65
[/TD]
[TD="align: right"]1.65
[/TD]
[TD="align: right"]4.37
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]1:00 PM
[/TD]
[TD="align: left"]2:00 PM
[/TD]
[TD="align: left"]PHONE-646-230-0417 OK TO DROP
OFF
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]123.10
[/TD]

[TD="bgcolor: #CACACA, align: center"]10
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100035140296
[/TD]
[TD="align: left"]75174101
[/TD]
[TD="align: left"]Stop 7
[/TD]
[TD="align: left"]Customer8
[/TD]
[TD="align: left"]101 AVENUE OF THE AMERICAS
[/TD]

[TD="align: left"]7
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10013
[/TD]
[TD="align: left"]7183896100
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]1:51 PM
[/TD]
[TD="align: left"]12:38 PM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]0.99
[/TD]
[TD="align: right"]0.99
[/TD]
[TD="align: right"]5.36
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]3:00 PM
[/TD]
[TD="align: left"]DELIVER WEDS 10/3
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]1,689.40
[/TD]

[TD="bgcolor: #CACACA, align: center"]11
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100035140296
[/TD]
[TD="align: left"]75298191
[/TD]
[TD="align: left"]Stop 7
[/TD]
[TD="align: left"]Customer9
[/TD]
[TD="align: left"]101 AVENUE OF THE AMERICAS
[/TD]

[TD="align: left"]7
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10013
[/TD]
[TD="align: left"]7183896100
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]1:51 PM
[/TD]
[TD="align: left"]12:38 PM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]0.99
[/TD]
[TD="align: right"]0.99
[/TD]
[TD="align: right"]5.36
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]#######
[/TD]
[TD="align: left"]3:00 PM
[/TD]
[TD="align: left"]DELIVER WEDS 10/3
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]1,978.82
[/TD]

[TD="bgcolor: #CACACA, align: center"]12
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]Route ID: 1 - 303
[/TD]
[TD="align: left"]100136210228
[/TD]
[TD="align: left"]75252871
[/TD]
[TD="align: left"]Stop 8
[/TD]
[TD="align: left"]BLACKMAN SHOWROOM AT
LYNBROOK
[/TD]
[TD="align: left"]138 LEXINGTON AVENUE
[/TD]
[TD="align: left"]X-29TH STREET
[/TD]
[TD="align: left"]8
[/TD]
[TD="align: left"]NEW YORK
[/TD]
[TD="align: left"]NY
[/TD]
[TD="align: left"]10016
[/TD]
[TD="align: left"]5165933100
[/TD]
[TD="align: left"]Farrell, Brian P
[/TD]
[TD="align: left"]#####
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]3:18 PM
[/TD]
[TD="align: left"]1:17 PM
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: left"]######
[/TD]
[TD="align: right"]2.42
[/TD]
[TD="align: right"]2.42
[/TD]
[TD="align: right"]0.12
[/TD]

[TD="align: right"][/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]###
[/TD]
[TD="align: left"]3:00 PM
[/TD]
[TD="align: left"]4:00 PM
[/TD]
[TD="align: left"]PLEASE DELIVER ON WED 10/03 PER
CUST LEADTIME APPROX 2 WEEKS. THANK YOU- GAYLE S
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: left"]T
[/TD]
[TD="align: right"]-1
[/TD]
[TD="align: left"]######
[/TD]

[TD="align: right"]1,945.67
[/TD]

</tbody>


Excel
tables to the web >>


Customer Deliveries Report


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
Customer 1
NEW YORK
Brian
Customer 2
NEW YORK
Brian
Customer 3
NEW YORK
Brian
Customer 4
NEW YORK
Brian
Customer 5
NEW YORK
Brian

<tbody>
[TD="bgcolor: #CACACA, align: center"]1
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Route
Date
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Vehicle
Description
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Order
No
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Stop
No
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Customer
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Town
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Zip
Code
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Driver
[/TD]
[TD="bgcolor: #FFFF00, align: center"]Arrival
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Departure
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Stop
Duration
[/TD]
[TD="bgcolor: #99CCFF, align: center"]Distance
[/TD]
[TD="bgcolor: #99CCFF, align: center"]TWI
Open Time
[/TD]
[TD="bgcolor: #99CCFF, align: center"]TWI
Close Time
[/TD]

[TD="bgcolor: #CACACA, align: center"]2
[/TD]
[TD="align: center"]10/3/2012
[/TD]
[TD="align: right"]303
[/TD]
[TD="align: center"]75471331
[/TD]
[TD="align: center"]1
[/TD]

[TD="align: center"]10011
[/TD]

[TD="bgcolor: #FFFF00, align: center"]8:00
PM
[/TD]
[TD="align: center"]11:08 AM
[/TD]
[TD="align: center"]988431:08
[/TD]
[TD="align: center"]56.75
[/TD]
[TD="align: center"]11:00 AM
[/TD]
[TD="align: center"]12:00 PM
[/TD]

[TD="bgcolor: #CACACA, align: center"]3
[/TD]
[TD="align: center"]10/3/2012
[/TD]
[TD="align: right"]303
[/TD]
[TD="align: center"]74844361
[/TD]
[TD="align: center"]1
[/TD]

[TD="align: center"]10001
[/TD]

[TD="bgcolor: #FFFF00, align: center"]8:00
PM
[/TD]
[TD="align: center"]12:44 PM
[/TD]
[TD="align: center"]988432:44
[/TD]
[TD="align: center"]4.54
[/TD]
[TD="align: center"]12:00 PM
[/TD]
[TD="align: center"]1:00 PM
[/TD]

[TD="bgcolor: #CACACA, align: center"]4
[/TD]
[TD="align: center"]10/3/2012
[/TD]
[TD="align: right"]303
[/TD]
[TD="align: center"]75456911
[/TD]
[TD="align: center"]1
[/TD]

[TD="align: center"]10001
[/TD]

[TD="bgcolor: #FFFF00, align: center"]8:00
PM
[/TD]
[TD="align: center"]1:25 PM
[/TD]
[TD="align: center"]988433:25
[/TD]
[TD="align: center"]4.37
[/TD]
[TD="align: center"]1:00 PM
[/TD]
[TD="align: center"]2:00 PM
[/TD]

[TD="bgcolor: #CACACA, align: center"]5
[/TD]
[TD="align: center"]10/3/2012
[/TD]
[TD="align: right"]303
[/TD]
[TD="align: center"]75174101
[/TD]
[TD="align: center"]1
[/TD]

[TD="align: center"]10013
[/TD]

[TD="bgcolor: #FFFF00, align: center"]8:00
PM
[/TD]
[TD="align: center"]3:18 PM
[/TD]
[TD="align: center"]988435:18
[/TD]
[TD="align: center"]5.36
[/TD]
[TD="align: center"]11:00 AM
[/TD]
[TD="align: center"]3:00 PM
[/TD]

[TD="bgcolor: #CACACA, align: center"]6
[/TD]
[TD="align: center"]10/3/2012
[/TD]
[TD="align: right"]303
[/TD]
[TD="align: center"]75252871
[/TD]
[TD="align: center"]1
[/TD]

[TD="align: center"]10016
[/TD]

[TD="bgcolor: #FFFF00, align: center"]8:00
PM
[/TD]
[TD="align: center"]3:31 PM
[/TD]
[TD="align: center"]988435:31
[/TD]
[TD="align: center"]0.12
[/TD]
[TD="align: center"]3:00 PM
[/TD]
[TD="align: center"]4:00 PM
[/TD]

[TD="bgcolor: #CACACA, align: center"]7
[/TD]

</tbody>


Excel
tables to the web >>
Excel Jeanie
HTML 4

This is the result of the code it is wrong.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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