Finding the last filled row and appending to it

G

Guest

Guest
Dear MrExcel..
I just want to say that I really love your site . I also have a small problem that you might help solving it..
I would like to run a VBA Code on an excel sheet
1- It should locate all the rows that has data in them
2-after finding all the rows , I want to copy then to another sheet in a different workbook
3-before copying to the other sheet , I want the code to locate the last filled record and then past underneath it (Append)
could you please help .

I have started but could not finish
this is what I did

Dim I As Long
Dim RngDestination As Range
Dim Wkb As Workbook
Dim Wks As Worksheet

Set RngDestination = Wkb("Test for Annuity Daily Adds.xls") _
.Wks("Annuity Rec Feb 2002").Range("A6522")

Range(Selection, Selection.End(xlUp)).Select


For i = Cells(Rows.Count, "A").End(xlUp).Row To i Step -1
Cells(i, "A").EntireRow.Copy Destination:=RngDestination

Next i
End Sub
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Did you ever find a solution to this?

If so, please post. I'm needing to do soemthing similar in migrating 8 reports (all same format, just different criteria) from an external database into one contiguous report within a master excel document.

I'll repost this question of no answer in a few days. I hate to ask something that's already been addressed.
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top