Thread: Row find Macro
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
James James is offline
external usenet poster
 
Posts: 542
Default Row find Macro

Hi Rick

Many thanks for this I tried it with the column letters and it seemed to
work. One more question of you don't mind I am now trying to paste the data
into another sheet and thought this was ok but seems not! I tried:

Sheets("Sheet2").Select
Cells(Rows.Count, "C").End(xlUp).Select
Intersect(ActiveCell.EntireRow, Range("F:Q")).Paste


I used "C" as this is where the last line of data shows and F:Q as this is
where I want to paste it but doesn't seem to work?



--
James.


"Rick Rothstein" wrote:

I just remembered, you wanted to copy columns B to M. Use this code instead
of what I posted...

Sheets("Sheet1").Select
Cells(Rows.Count, "A").End(xlUp).Select
Selection.Offset(0, 1).Resize(1, 12).Copy

or you could do it this way if you wanted to see the column letters...

Sheets("Sheet1").Select
Cells(Rows.Count, "A").End(xlUp).Select
Intersect(ActiveCell.EntireRow, Range("B:M")).Copy

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Try it this way...

Sheets("Sheet1").Select
Cells(Rows.Count, "A").End(xlUp).Select
Selection.Copy
...etc...

--
Rick (MVP - Excel)


"James" wrote in message
...
Hi

I'm trying to write some code so as that I can copy the last row in a
sheet.
Each day a new row is added so I need it to find the new row each day. I
have
written the below however although it keeps copying row 46 and not the
last
one! Any thoughts??

Sheets("Sheet1").Select
Range("A1").Select
Selection.End(xlDown).Select
Range("B46:M46").Select
Selection.Copy


--
James.



.