VBA to paste data under current data?

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
785
Office Version
  1. 365
Platform
  1. Windows
Hi,
I have a macro that pastes values from Sheet1 into a report.
But im also wanting to paste values from Sheet2 into report, but under the sheet1 data (preferably on the following page)

Can this be done? Appreciate any help
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi!

For getting the last row on the active sheet (IF column "A" is the longest):
Code:
ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row

With given "details":
Code:
' This give you the last cell row number in column A
lastrow = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
' Copy the desired range on Sheet2. Please adjust it to your need
Sheets(2).range("...").Copy
Sheets(1).select
' selecting the first empty cell after last cell
Range("A" & lastrow+1).select
' then paste it
Activesheet.Paste
 
Upvote 0
Hi could anyone help me with a vba code for this? im not sure how to copy the following columns using the vba CsJHUN posted

I need to copy / paste values from the columns listed underneath the last row of data in report.
From Sheet (Data)
Columns (B,K,J,F,H,I,G)


To sheet (Report)
paste values from the above columns after the last row of data if possible in columns A - G under last row of current data

thanks
 
Upvote 0
If you're open to it, you could do this in Parabola (https://parabola.io/) without any VBA code. Import your sheet, connect a "Column Filter", filter down to your columns, connect a "Column reorder", re order your columns, then connect that result and the original sheet with a "Concat" object. Then export the result. Should only take a few minutes, and there's a free trial.
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,996
Members
448,935
Latest member
ijat

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