Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasted values keep changing to time number format
I'm trying to paste concatenated values to cells on a spreadsheet using
this formula: ActiveCell.Value = ActiveCell.Offset(0, 5).Value & " - " & ActiveCell.Offset(0, 6).Value But when a concatenated value that looks like a date gets pasted into a cell, the cell turns it into a date. For instance, if my formula pastes "4 - 72" into a cell, Excel changes it into Apr-4. I've tried turning the values into strings, adding spaces, etc., but Excel always turns my pasted values into dates. I feel like a dolt for asking this, and I've been through the help utility and Googled it, but I just can't work out how to suppress the autoformat function, or whatever that is. Thanks for any help. ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasted values keep changing to time number format
Try this line just before you transfer the values... ActiveCell.NumberFormat = "@" '-- Your name seems familiar...? -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Arch Stanton" wrote in message I'm trying to paste concatenated values to cells on a spreadsheet using this formula: ActiveCell.Value = ActiveCell.Offset(0, 5).Value & " - " & ActiveCell.Offset(0, 6).Value But when a concatenated value that looks like a date gets pasted into a cell, the cell turns it into a date. For instance, if my formula pastes "4 - 72" into a cell, Excel changes it into Apr-4. I've tried turning the values into strings, adding spaces, etc., but Excel always turns my pasted values into dates. I feel like a dolt for asking this, and I've been through the help utility and Googled it, but I just can't work out how to suppress the autoformat function, or whatever that is. Thanks for any help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasted values keep changing to time number format
Jim, this worked great. I'll keep the name Primitive Software in my mental Rolodex in case I run across anyone who needs it. You should watch "The Good, The Bad, and The Ugly" again. Seriously, it's a better movie than you remember. (You've seen it before, I gather, which is why my internet pseudonym is familiar). Thanks again, amigo. AS Jim Cone wrote: Try this line just before you transfer the values... ActiveCell.NumberFormat = "@" '-- Your name seems familiar...? ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pasted values keep changing to time number format
I remember it as a good movie. That was the name on the headstone where the treasure was buried. Thanks, because without your hint I would still be wondering if maybe I went to school with you. <g Jim Cone "Arch Stanton" wrote in message Jim, this worked great. I'll keep the name Primitive Software in my mental Rolodex in case I run across anyone who needs it. You should watch "The Good, The Bad, and The Ugly" again. Seriously, it's a better movie than you remember. (You've seen it before, I gather, which is why my internet pseudonym is familiar). Thanks again, amigo. AS Jim Cone wrote: Try this line just before you transfer the values... ActiveCell.NumberFormat = "@" '-- Your name seems familiar...? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing time format | Excel Discussion (Misc queries) | |||
Pasted values that paste as "number stored as text" | Excel Discussion (Misc queries) | |||
Changing a number into time | Excel Discussion (Misc queries) | |||
Changing format of number without changing the value | Excel Discussion (Misc queries) | |||
changing time format | Excel Programming |