Private Sub PostProcessActiveRange()
Dim vArr As Variant
Dim i As Long
If rnAR_Dest.Columns.Count > 2 Then
Application.DisplayAlerts = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This code deals with the comma bug in the Name of a
' company, if it is returned before a numeric value.
' In this case, YF does not enclose the name of
' a company in quotation marks. As a result a comma
' in the name of a corporation (, Inc.) will be treated
' as a field separator by the TextToColumns procedure.
' This code removes such commas. It is unknown what
' impact this may cause on other attributes, but most
' attributes are numeric and so unaffected.
vArr = rnAR_Table.Resize(rnAR_Dest.Rows.Count - 1, 1)
For i = LBound(vArr) To UBound(vArr)
vArr(i, 1) = Replace(vArr(i, 1), ", ", " ")
'The following line was added by Luke M to handle blank columns
vArr(i, 1) = Replace(vArr(i, 1), ",,", ",")
Next i
Application.EnableEvents = False
rnAR_Table.Resize(rnAR_Dest.Rows.Count - 1) = vArr
Application.EnableEvents = True
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
rnAR_Table.Resize(rnAR_Dest.Rows.Count).TextToColumns Destination:=rnAR_Table, DataType:=xlDelimited, Comma:=True
Application.DisplayAlerts = True
Worksheets(stAR_ConfigSheetName).[ar_LocalTimeLastUpdate] = Now
End If
End Sub