View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jeff W. Jeff W. is offline
external usenet poster
 
Posts: 38
Default Help/Advice copying from one sheet to another

The cell I am coming from is a single cell and the one's I'm going to
some are merged and this errors out, with a message about merged cells
and the debugger comes up


<Jeff

"Jay" wrote in message
...
Hi Jeff -

How about something like these 3 statements (replace range addresses and
sheet names to suit):

Worksheets("Sheet1").Range("A1").CurrentRegion.Cop y
Worksheets("Sheet2").Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False

---
Jay


"Jeff W." wrote:

I need to copy data from one sheet to another in a macro
the destination sheet is formatted with borders and the like
and the data is coming from another sheet that gets created
but when I copy cell date from one page to another sheet
my cell formats get screwed up

Not sure what the best way to do this is without having to re-format
each cell after the paste.

The cvs file I read in varies in length but is always 6 columns wide
some cells contain string data and some numeric values

The number of rows always varies.

any suggestions?

Regards,

Jeff W.