Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
String to Variant incorrect conversion
I am using Harlan Grove's PULL function to grab data from other
spreadsheets, and it mostly works except that some strings that look like dates get converted to numbers and therefore don't work with VLOOKUP and the like. For example, "06-6107" gets changed to 1536728. It seems that this is happening in this bit of code: For Each c In r c.Value = xlapp.ExecuteExcel4Macro(b & c.Address(1, 1, xlR1C1)) Next c The Value property is a Variant, so in the conversion the string is interpreted as a date. Is there any way to force that to be converted a Variant/String instead of Variant/Double? Thanks, Paul |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
String to Variant incorrect conversion
Check your other post.
Paul wrote: I am using Harlan Grove's PULL function to grab data from other spreadsheets, and it mostly works except that some strings that look like dates get converted to numbers and therefore don't work with VLOOKUP and the like. For example, "06-6107" gets changed to 1536728. It seems that this is happening in this bit of code: For Each c In r c.Value = xlapp.ExecuteExcel4Macro(b & c.Address(1, 1, xlR1C1)) Next c The Value property is a Variant, so in the conversion the string is interpreted as a date. Is there any way to force that to be converted a Variant/String instead of Variant/Double? Thanks, Paul -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I assign range to variant and use | Excel Discussion (Misc queries) | |||
counting the number of instances of a string within another string | Excel Worksheet Functions | |||
How do I replace last numeric string from a alphanumeric string? | Excel Discussion (Misc queries) | |||
Splitting a text string into string and number | Excel Discussion (Misc queries) | |||
to search for a string and affect data if it finds the string? | Excel Worksheet Functions |