copy paste in correct data

P

Peter

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?
 
P

Project Mangler

Peter,

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

Peter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top