T
T. Jenkins
I'm using the following code to load variable with data
from a spreadsheet. This works fine if the data is
clearly text or numeric format, but fails when the data is
sort of a hybrid. In this case, we have cell contents
that include "01", "02", etc. When these are pasted into
the new sheet, they come over as 1, 2, etc. This is a
problem.
Is there any way to use this same logic, but have it paste
the data as text (e.g., with the preceeding zero)?
Thanks, Todd
For j = 1 To LotCount
myRange.Offset(j, ColStart).Resize(1, 1).Select
mytemp = myRange.Offset(j, ColStart).Resize(1, 1).Value
If mytemp > 0 Then
mytemp2 = myRange.Offset(j, 0).Resize(1, 1).Value
' MsgBox "Lot # = " & mytemp2
' MsgBox "Bid = " & mytemp
myLot(j) = mytemp2
myBid(j) = mytemp
End If
Next j
from a spreadsheet. This works fine if the data is
clearly text or numeric format, but fails when the data is
sort of a hybrid. In this case, we have cell contents
that include "01", "02", etc. When these are pasted into
the new sheet, they come over as 1, 2, etc. This is a
problem.
Is there any way to use this same logic, but have it paste
the data as text (e.g., with the preceeding zero)?
Thanks, Todd
For j = 1 To LotCount
myRange.Offset(j, ColStart).Resize(1, 1).Select
mytemp = myRange.Offset(j, ColStart).Resize(1, 1).Value
If mytemp > 0 Then
mytemp2 = myRange.Offset(j, 0).Resize(1, 1).Value
' MsgBox "Lot # = " & mytemp2
' MsgBox "Bid = " & mytemp
myLot(j) = mytemp2
myBid(j) = mytemp
End If
Next j