Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default .Text .Formula .Value to replace copy_paste values?

Hi,

I'm trying to copy values from an original set of columns into a new set of
columns, where the column order is different.
Can I replicate copy_paste values functionality with something as below?

mystartcellnewset.cells(i,j).formula = mystartcelloldset.cells(i,k).value

I've tried different combinations of .formula, .text, .value, and the above
gives the best results, but I still get things like number of employees ("5 -
10") converted to date, and phonenumber text converted to a number without
leading 0 etc.

copy_paste values in a double loop (column, row) seems very inefficient, so
I'd like to do this in a single simple statement...

thanks beforehand,
Rikkart
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default .Text .Formula .Value to replace copy_paste values?

Did you read all the posts at your other thread?



Rikkart wrote:

Hi,

I'm trying to copy values from an original set of columns into a new set of
columns, where the column order is different.
Can I replicate copy_paste values functionality with something as below?

mystartcellnewset.cells(i,j).formula = mystartcelloldset.cells(i,k).value

I've tried different combinations of .formula, .text, .value, and the above
gives the best results, but I still get things like number of employees ("5 -
10") converted to date, and phonenumber text converted to a number without
leading 0 etc.

copy_paste values in a double loop (column, row) seems very inefficient, so
I'd like to do this in a single simple statement...

thanks beforehand,
Rikkart


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default .Text .Formula .Value to replace copy_paste values?

Hi Dave,
thanks for the reply. (I couldn't find my previous post, so couldn't check -
even now, searching for "copy_paste" doesn't give me this post in the
results. Pagebrowsing still works...)

Anyway, thanks, I tried NumberFormat but that didn't help, but I'll try
including Value2.
(Meanwhile, I actually tested the copy-paste option, and processed 1062
lines in 5 minutes instead of in 12 seconds (with errors))

any further clues?

"Dave Peterson" wrote:

Did you read all the posts at your other thread?



Rikkart wrote:

Hi,

I'm trying to copy values from an original set of columns into a new set of
columns, where the column order is different.
Can I replicate copy_paste values functionality with something as below?

mystartcellnewset.cells(i,j).formula = mystartcelloldset.cells(i,k).value

I've tried different combinations of .formula, .text, .value, and the above
gives the best results, but I still get things like number of employees ("5 -
10") converted to date, and phonenumber text converted to a number without
leading 0 etc.

copy_paste values in a double loop (column, row) seems very inefficient, so
I'd like to do this in a single simple statement...

thanks beforehand,
Rikkart


--

Dave Peterson
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default .Text .Formula .Value to replace copy_paste values?


I use google to search groups.

http://groups.google.com/advanced_se...blic.excel. *

Give it enough information (you as the author, maybe a keyword or date) and
you'll find it.

You could always force it to be Text:

with somecell
.numberformat = "@"
.value = someothercell.text
end with



Rikkart wrote:

Hi Dave,
thanks for the reply. (I couldn't find my previous post, so couldn't check -
even now, searching for "copy_paste" doesn't give me this post in the
results. Pagebrowsing still works...)

Anyway, thanks, I tried NumberFormat but that didn't help, but I'll try
including Value2.
(Meanwhile, I actually tested the copy-paste option, and processed 1062
lines in 5 minutes instead of in 12 seconds (with errors))

any further clues?

"Dave Peterson" wrote:

Did you read all the posts at your other thread?



Rikkart wrote:

Hi,

I'm trying to copy values from an original set of columns into a new set of
columns, where the column order is different.
Can I replicate copy_paste values functionality with something as below?

mystartcellnewset.cells(i,j).formula = mystartcelloldset.cells(i,k).value

I've tried different combinations of .formula, .text, .value, and the above
gives the best results, but I still get things like number of employees ("5 -
10") converted to date, and phonenumber text converted to a number without
leading 0 etc.

copy_paste values in a double loop (column, row) seems very inefficient, so
I'd like to do this in a single simple statement...

thanks beforehand,
Rikkart


--

Dave Peterson
.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy_paste to the first blank row RLY Excel Programming 4 September 1st 09 09:55 PM
Replace values with text Mark Excel Worksheet Functions 1 January 17th 09 12:55 AM
A macro solution - replace text given the values Sinner Excel Programming 8 September 17th 08 04:29 PM
Automatically Accept Replace Values in Text-to-Columns macro [email protected] Excel Programming 2 July 31st 08 03:04 PM
Append Text to Cell Values Using Replace Ngan Excel Discussion (Misc queries) 4 June 4th 05 08:30 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"