C
Captain_Nemo
Hell All -
I am importing data from the web. On the web the data is a phone
number: 4-3231
When it gets to Excel, Excel says "Aha! A date, no doubt!" and turns it
into 4/1/3231 and displays Apr-31, with a new custom mmm-yy format.
Is there a VBA way to turn off this Excel magic and leave April 1, 3231
as the string it used to be: 4-3231?
I tried to pre-format the cell as "General" in which case Excel turns it
into the serial date 486230. No help.
The best I've come up with so far is to test
If IsDate(GetPhone) Then GetPhone = "'" & Month(GetPhone) & "-" &
Year(GetPhone)
adding a single quote at the start to coerce a string. My sense is that
there is a more elegant way.
Can anyone chime in?
Thanks in advance.
....best, Capt N.
--
Email to (e-mail address removed) (yes, you can so figure it out) ;-]
Scream and shout and jump for joy! I was here before Kilroy!
Sorry to spoil your little joke. I was here but my computer broke. ---Kilroy
I am importing data from the web. On the web the data is a phone
number: 4-3231
When it gets to Excel, Excel says "Aha! A date, no doubt!" and turns it
into 4/1/3231 and displays Apr-31, with a new custom mmm-yy format.
Is there a VBA way to turn off this Excel magic and leave April 1, 3231
as the string it used to be: 4-3231?
I tried to pre-format the cell as "General" in which case Excel turns it
into the serial date 486230. No help.
The best I've come up with so far is to test
If IsDate(GetPhone) Then GetPhone = "'" & Month(GetPhone) & "-" &
Year(GetPhone)
adding a single quote at the start to coerce a string. My sense is that
there is a more elegant way.
Can anyone chime in?
Thanks in advance.
....best, Capt N.
--
Email to (e-mail address removed) (yes, you can so figure it out) ;-]
Scream and shout and jump for joy! I was here before Kilroy!
Sorry to spoil your little joke. I was here but my computer broke. ---Kilroy