Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default copy paste in correct data

I'm trying to coping and paste the contents of cell, and I'm pasting
something, just not the correct data.

In the cell that I'm coping is the value 1 the value that gets pasted if
1/1/1900

Here is the code that I'ce got

Debug.Print rngFind.Offset(0, 2).Value // prints one in the Immediate
window which is correct
jnk = rngFind.Offset(0, 2).Value //jnk is = "1"
x.Offset(0, 8).Value = jnk // the celvalue is 1/1/1900
Debug.Print x.Offset(0, 8) // prints 12/31/1899 in the
Immediate window

Any ideas?




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default copy paste in correct data

Peter,

Looks like the cell is formatted as date type.
something like Range(yourrange).NumberFormat = general should give you 1 in
the cell.


"Peter" wrote in message
...
I'm trying to coping and paste the contents of cell, and I'm pasting
something, just not the correct data.

In the cell that I'm coping is the value 1 the value that gets pasted if
1/1/1900

Here is the code that I'ce got

Debug.Print rngFind.Offset(0, 2).Value // prints one in the Immediate
window which is correct
jnk = rngFind.Offset(0, 2).Value //jnk is = "1"
x.Offset(0, 8).Value = jnk // the celvalue is 1/1/1900
Debug.Print x.Offset(0, 8) // prints 12/31/1899 in the
Immediate window

Any ideas?






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default copy paste in correct data

Yes, in the sheet I'm copying from, those cells have that upper corner
green tag to them and the error is that this cell is formatted as text or
proceeded by an apostrophe. So I got that thanks


"Project Mangler" wrote in message
...
Peter,

Looks like the cell is formatted as date type.
something like Range(yourrange).NumberFormat = general should give you 1
in
the cell.


"Peter" wrote in message
...
I'm trying to coping and paste the contents of cell, and I'm pasting
something, just not the correct data.

In the cell that I'm coping is the value 1 the value that gets pasted if
1/1/1900

Here is the code that I'ce got

Debug.Print rngFind.Offset(0, 2).Value // prints one in the Immediate
window which is correct
jnk = rngFind.Offset(0, 2).Value //jnk is = "1"
x.Offset(0, 8).Value = jnk // the celvalue is 1/1/1900
Debug.Print x.Offset(0, 8) // prints 12/31/1899 in the
Immediate window

Any ideas?








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
How copy none excel data & paste in 2007 without overwriting data Wakefootin Excel Discussion (Misc queries) 2 October 8th 09 12:15 AM
Copy and Paste data Michael M Excel Programming 7 November 10th 06 12:29 AM
filted data, copy and paste a col. puts data in wrong row how fix chris_fig New Users to Excel 1 October 16th 06 04:26 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
IN AN IF FORMULA COPY STRING OF DATA IF A CELL IS CORRECT Might also be another tricky formula Setting up and Configuration of Excel 1 October 12th 05 09:21 PM


All times are GMT +1. The time now is 02:23 PM.

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

About Us

"It's about Microsoft Excel"