Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copy range lead to lost data

I am using excel 2000

i use the following code:

oBook.Worksheets(name).Range("$E" & temp2).Copy
(newBook.Worksheets(name).Range("$E" & temp1))

the range is with thousand of character

when i copy the range to another sheet, part of the data are missing..

although i can use the range1.value = range2.value to preserve the data
but all the formating in the cell will be lost.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Copy range lead to lost data

Go ahead and use the value property as you described, then include these
steps:

oBook.Worksheets(name).Range("$E" & temp2).Copy
newBook.Worksheets(name).Range("$E" & temp1).Select
Selection.PasteSpecial Paste:=xlPasteFormats

There may even be a way around selecting the area to paste to, I didn't
think too much about it.


"Laguna" wrote in message
...
I am using excel 2000

i use the following code:

oBook.Worksheets(name).Range("$E" & temp2).Copy
(newBook.Worksheets(name).Range("$E" & temp1))

the range is with thousand of character

when i copy the range to another sheet, part of the data are missing..

although i can use the range1.value = range2.value to preserve the data
but all the formating in the cell will be lost.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copy range lead to lost data

this does not work if the data inside the cell have different formats
I CAN GET format character by character, but the program may run slower.
anyway, thank you for your help

"William Benson" wrote:

Go ahead and use the value property as you described, then include these
steps:

oBook.Worksheets(name).Range("$E" & temp2).Copy
newBook.Worksheets(name).Range("$E" & temp1).Select
Selection.PasteSpecial Paste:=xlPasteFormats

There may even be a way around selecting the area to paste to, I didn't
think too much about it.


"Laguna" wrote in message
...
I am using excel 2000

i use the following code:

oBook.Worksheets(name).Range("$E" & temp2).Copy
(newBook.Worksheets(name).Range("$E" & temp1))

the range is with thousand of character

when i copy the range to another sheet, part of the data are missing..

although i can use the range1.value = range2.value to preserve the data
but all the formating in the cell will be lost.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Copy range lead to lost data

OK, did you perhaps copying the format first?

"Laguna" wrote in message
...
this does not work if the data inside the cell have different formats
I CAN GET format character by character, but the program may run slower.
anyway, thank you for your help

"William Benson" wrote:

Go ahead and use the value property as you described, then include these
steps:

oBook.Worksheets(name).Range("$E" & temp2).Copy
newBook.Worksheets(name).Range("$E" & temp1).Select
Selection.PasteSpecial Paste:=xlPasteFormats

There may even be a way around selecting the area to paste to, I didn't
think too much about it.


"Laguna" wrote in message
...
I am using excel 2000

i use the following code:

oBook.Worksheets(name).Range("$E" & temp2).Copy
(newBook.Worksheets(name).Range("$E" & temp1))

the range is with thousand of character

when i copy the range to another sheet, part of the data are missing..

although i can use the range1.value = range2.value to preserve the data
but all the formating in the cell will be lost.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copy range lead to lost data

Thank you for your help.
Finally I find the way for the solution
Instead of just simple paste
i use the pasteSpecial(xlPasteAll)
this will make all format and value preserved without lost

"William Benson" wrote:

OK, did you perhaps copying the format first?

"Laguna" wrote in message
...
this does not work if the data inside the cell have different formats
I CAN GET format character by character, but the program may run slower.
anyway, thank you for your help

"William Benson" wrote:

Go ahead and use the value property as you described, then include these
steps:

oBook.Worksheets(name).Range("$E" & temp2).Copy
newBook.Worksheets(name).Range("$E" & temp1).Select
Selection.PasteSpecial Paste:=xlPasteFormats

There may even be a way around selecting the area to paste to, I didn't
think too much about it.


"Laguna" wrote in message
...
I am using excel 2000

i use the following code:

oBook.Worksheets(name).Range("$E" & temp2).Copy
(newBook.Worksheets(name).Range("$E" & temp1))

the range is with thousand of character

when i copy the range to another sheet, part of the data are missing..

although i can use the range1.value = range2.value to preserve the data
but all the formating in the cell will be lost.









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Copy range lead to lost data

I am surprised this did not result in the 256 character limitation ... good
job!
"Laguna" wrote in message
...
Thank you for your help.
Finally I find the way for the solution
Instead of just simple paste
i use the pasteSpecial(xlPasteAll)
this will make all format and value preserved without lost

"William Benson" wrote:

OK, did you perhaps copying the format first?

"Laguna" wrote in message
...
this does not work if the data inside the cell have different formats
I CAN GET format character by character, but the program may run
slower.
anyway, thank you for your help

"William Benson" wrote:

Go ahead and use the value property as you described, then include
these
steps:

oBook.Worksheets(name).Range("$E" & temp2).Copy
newBook.Worksheets(name).Range("$E" & temp1).Select
Selection.PasteSpecial Paste:=xlPasteFormats

There may even be a way around selecting the area to paste to, I
didn't
think too much about it.


"Laguna" wrote in message
...
I am using excel 2000

i use the following code:

oBook.Worksheets(name).Range("$E" & temp2).Copy
(newBook.Worksheets(name).Range("$E" & temp1))

the range is with thousand of character

when i copy the range to another sheet, part of the data are
missing..

although i can use the range1.value = range2.value to preserve the
data
but all the formating in the cell will be lost.









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
Changes in data do not lead to instantaneous update of results Pistols14 Excel Discussion (Misc queries) 2 November 26th 07 09:35 AM
How do I copy data range of the same name to another tab? Amy Wong Excel Worksheet Functions 4 October 10th 06 10:48 PM
Help!: lead sheet data needs to fill appropriate subject sheets carebear Excel Worksheet Functions 0 November 17th 04 07:43 PM
Help!: lead sheet data needs to fill appropriate subject sheets carebear Excel Worksheet Functions 1 November 12th 04 09:03 PM
copy data range Paulw2k Excel Programming 2 April 21st 04 12:26 AM


All times are GMT +1. The time now is 10:55 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"