Using the Down_end statement

  • Thread starter Thread starter Ed Davis
  • Start date Start date
E

Ed Davis

I am sorry I do not think I was clear enough.
I want to take what is in Cell d4 from sheet1 and copy it to the first empty
cell in sheet2 under d.
I want to do this for a couple of the cells that are in sheet1.

Thanks
 
Always stay in the original thread instead of starting a new thread for the
same question. Perhaps, if you actually try what I offered you can figure
out how to modify to suit your needs.
 
Ed,

Note that the 4 in the Cells( ) refers to column D...

Worksheets("Sheet1").Range("D4").Copy
Worksheets("Sheet2").Cells(Rows.Count,4).End(xlUp)(2)

HTH,
Bernie
MS Excel MVP
 
Here is my original, spoon fed to accommodate your need.
It just reminds me that the most important thing I learned in college was
how to think.

Sub don()
dlr = Sheets("sheet2").Cells(Rows.Count, "d").End(xlUp).Row + 1
Sheets("sheet1").Range("d4").Copy Sheets("sheet2").Cells(dlr, "d")
End Sub
 
Bernie, I hope that didn't meant that I thought YOU couldn't think. I just
wondered why the OP couldn't figure out the need from my original post and
your clarification about cells column.
 
Ed,

Sorry - the reason you get the error is that I posted the code on one line,
and the line was wrapped at the space by either your newsreader or browser
or my newsreader.

Just put a space and underscore at the end of the first line, like so:

Worksheets("Sheet1").Range("D4").Copy _
Worksheets("Sheet2").Cells(Rows.Count,4).End(xlUp)(2)

and the code will work fine when you copy and paste it.

Sorry about that,
Bernie
MS Excel MVP
 
Don,

I know - but right now, I am having trouble thinking - I just finished my 7
mile run in rather warm weather ;-)

Bernie
 
Back
Top