ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find last row in column and past below (https://www.excelbanter.com/excel-programming/428209-find-last-row-column-past-below.html)

winnie123

Find last row in column and past below
 
Sorry I am asking for help again.

Been working on this most of the day now and can not get it figured, I am
sure it will be something simple but just keep going round in circles.

I am trying to copy a range A4:B4 to a different worksheet just below the
current last row of data. code below

Sheets("Temp").Select
Range("A4:B4").Copy
Sheets("CustomerLogSheet").Select
Range("A1" & Lrow + 1).PasteSpecial

It does not give me an error, but it copies and overwrites data already in
sheet.

I have tried to debug and Range("A1" & Lrow + 1) equals 4

So I end up with the same amount rowss previously but with one record missing.

In the Colum A I have a value in Row 1, then Row 2 is Blank, then Row 3
until the last row has data.

I tried putting a value in Row 2 but it does not seem to make any difference

Thanks

Winnie

Per Jessen[_2_]

Find last row in column and past below
 
Hi Winnie

Look at this:

LastRow = Sheets("CustomerLogSheet").Range("A" & Rows.Count).End
(xlUp).Row

Sheets("Temp").Range("A4:B4").Copy
Sheets("CustomerLogSheet").Range("A" & LastRow + 1).PasteSpecial
(xlValues)
Application.CutCopyMode = False


Regards,
Per

On 8 Maj, 15:40, winnie123
wrote:
Sorry I am asking for help again.

Been working on this most of the day now and can not get it figured, I am
sure it will be something simple but just keep going round in circles.

I am trying to copy a range A4:B4 to a different worksheet just below the
current last row of data. code below

Sheets("Temp").Select
* * Range("A4:B4").Copy
Sheets("CustomerLogSheet").Select
Range("A1" & Lrow + 1).PasteSpecial

It does not give me an error, but it copies and overwrites data already in
sheet.

I have tried to debug and Range("A1" & Lrow + 1) equals 4

So I end up with the same amount rowss previously but with one record missing.

In the Colum A I have a value in Row 1, then Row 2 is Blank, then Row 3
until the last row has data.

I tried putting a value in Row 2 but it does not seem to make any difference

Thanks

Winnie



winnie123

Find last row in column and past below
 
Thank again Per, for the second time today.

it has worked and hopefully tonight I will finish my project.

I wonder will I ever get the hang of this but I guess unless I ask for help
I never will.

The next best thing to knowing something is knowing where to find it.

Thanks
Winnie


"Per Jessen" wrote:

Hi Winnie

Look at this:

LastRow = Sheets("CustomerLogSheet").Range("A" & Rows.Count).End
(xlUp).Row

Sheets("Temp").Range("A4:B4").Copy
Sheets("CustomerLogSheet").Range("A" & LastRow + 1).PasteSpecial
(xlValues)
Application.CutCopyMode = False


Regards,
Per

On 8 Maj, 15:40, winnie123
wrote:
Sorry I am asking for help again.

Been working on this most of the day now and can not get it figured, I am
sure it will be something simple but just keep going round in circles.

I am trying to copy a range A4:B4 to a different worksheet just below the
current last row of data. code below

Sheets("Temp").Select
Range("A4:B4").Copy
Sheets("CustomerLogSheet").Select
Range("A1" & Lrow + 1).PasteSpecial

It does not give me an error, but it copies and overwrites data already in
sheet.

I have tried to debug and Range("A1" & Lrow + 1) equals 4

So I end up with the same amount rowss previously but with one record missing.

In the Colum A I have a value in Row 1, then Row 2 is Blank, then Row 3
until the last row has data.

I tried putting a value in Row 2 but it does not seem to make any difference

Thanks

Winnie





All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com