Background
I'm using vlookup to pull in some data from another spreadsheet, but the numeric key that I'm using has the "'" (left aligned format character) in one spreadsheet, but not in the other. Format Cells... shows both sets of numbers are in "General" format. The result is that the vlookup fails as, not surprisingly, it can't match the keys.
This is not a problem manually, because the very helpful Excel 2002 is giving me the option to convert my range to number format with one click. However, I want to do this in VBA.
Problem
I've tried doing a record macro while I use the convert to number option, but it doesn't record anything. I've also tried:
Range("A5:A20"
.Select
Selection.NumberFormat = "General"
but the "'" remains.
Any help gratefully received.
tia
Chris
I'm using vlookup to pull in some data from another spreadsheet, but the numeric key that I'm using has the "'" (left aligned format character) in one spreadsheet, but not in the other. Format Cells... shows both sets of numbers are in "General" format. The result is that the vlookup fails as, not surprisingly, it can't match the keys.
This is not a problem manually, because the very helpful Excel 2002 is giving me the option to convert my range to number format with one click. However, I want to do this in VBA.
Problem
I've tried doing a record macro while I use the convert to number option, but it doesn't record anything. I've also tried:
Range("A5:A20"
Selection.NumberFormat = "General"
but the "'" remains.
Any help gratefully received.
tia
Chris