View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
u473 u473 is offline
external usenet poster
 
Posts: 184
Default Convert numeric field from type 1 to type 2

My Lookup does not work because the LookUp field is sometimes of type
1 and sometimes type 2
I tried to fix that in the initial import step by converting the
culprit field to a string as follows :
..
Sub Convert()
Dim LastRow As Integer
LastRow = Range("E65335").End(xlUp).Row
Range("E1:E" & LastRow).NumberFormat = "@"
End Sub
..
The result leads me to believe that the conversion took place because
the data is now is Left-Aligned.
However the data type in that field is still unchanged.
Data in my source field in sometimes Numeric like 51693, sometimes
AlphaNumeric like TN101,
I need to have all that field converted to String or Text.
..
Thank you for your help,
..
J.P.