Thread: Copy and paste
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Copy and paste

Your description of the problem is not clear enough for me to give you a good
answer. Since I can't see your worksheet, you need to explain what data is
in which columns as well as the rows. For instance, is Test # 1 in the same
column as date run 1/1, or are they in the same cell? When you reference row
A9, do you mean cell or Range("A9") or just row 9? The more detailed the
description of the problem, the better the answer. You are the only one who
can see your worksheet.

Bear in mind that if you only rearrange data in one column, it will no
longer correspond to other data in the original row. That is if you move
data from Cell A9 to Cell A12 and everything else remains the same, any dates
that are now in Cell A12 that applied to Cells B9 through IV9 are
disconnected.

So, if you want to rearrange the entire row, then say it like that...entire
row. If you want to only move the cell the say either Cell A9 or Range("A9")
so we are talking the same language.

Think it over and repost with what you are trying to do. I'll check back in
a while.

"Eric" wrote:

that works great thank you. But I do have another questions .... If I only
have one test it shows up in the last row (row A12 from A9 to A12). Is there
a was that I can have it populate from the top down with the last (most
recent) test on the bottom.

ie:
2 tests run
row
A9 test #1 date run 1/1
A10 Test #2 date run 1/2
A11
A12

ie:
4 tests run

row
A9 test #1 date run 1/1
A10 Test #2 date run 1/2
A11 Test #3 date run 1/3
A12 Test #4 date run 1/4


"JLGWhiz" wrote:

Check the sheet name, I don't think I left a space between last and four.

"Eric" wrote:

I am using the following macro to copy the last four rows of information.
Here is the problem. The information starts in column "B" and I need to copy
it to cells("B9") Not cells("A9"). If I change cells("A9") to cells("B9") I
get an error, "area size doesn't match" or something to that effect. So
instead of copying the entire row I only want to copy from column B to column
AD. Any help would be appreciated thank you.
Eric

With Sheets("last four")
lr4 = Cells(Rows.count, 1)(Columns.count, 1).End(xlUp).Row
Rows(lr4 - 3 & ":" & lr4).Select
End With

Selection.Copy


Range("A9").Select
Selection.PasteSpecial Paste:=xlValues, operation:=xlNone, _
skipblanks:=False, Transpose:=False