Copy and Paste using assign value method

gd6noob

Board Regular
Joined
Oct 20, 2017
Messages
170
Office Version
  1. 2016
Platform
  1. Windows
Just a quick question for a quicker method for copy and pasting.

Normally I use something like
VBA Code:
Range(Range("A5"), Range("A5").End(xlDown)).copy
to copy and pasting to other sheets.. but I find it slow something. The amount of Data varies but usually 30,000-50,000. I was reading online for a faster way and found assigning values would be the fastest way to do this but its usually a set range but my data is different everyday.

How would I go about doing this? Also is it possible to assign the value to more then 1 sheet in one go?

What would be the best method be?


Thanks in advanced.
 

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.
Hello gd6,

You could use Auto Filter or perhaps even Advanced Filter but it may depend on what exactly you are intending to do.
Are you using a criteria in Column A on which you base the copy/paste or are you copy/pasting the entire dataset?

Perhaps you could elaborate further for us and supply a sample for us to see what you would like to do.

Cheerio,
vcoolio.
 
Upvote 0
Hello gd6,

You could use Auto Filter or perhaps even Advanced Filter but it may depend on what exactly you are intending to do.
Are you using a criteria in Column A on which you base the copy/paste or are you copy/pasting the entire dataset?

Perhaps you could elaborate further for us and supply a sample for us to see what you would like to do.

Cheerio,
vcoolio.
Hi vcoolio,

Thank you for your reply.
No need for filters, its pretty straight forward copy/paste. Sometimes I need to paste some columns into multiple sheets...

Here is a small sample, for this particular dataset, there are 32,000 rows and I will need columns A and B on 1 sheet and just column A on another sheet.
Book1
A
1Employee Id
2108580270
3104650662
4105293101
5106347095
6108912308
7108949639
8100715221
9102838831
10103139081
Sheet1


Regards,
 
Upvote 0
You said:
to copy and pasting to other sheets.. but I find it slow something.
So we are trying to show you another quicker way using Filter.

And from what your showing just one column of data I have no ideal what your wanting.
Can you please provide more details.
You only showed one line of code:
Range(Range("A5"), Range("A5").End(xlDown)).copy
Copy and paste where?
And what would second line of code be if you wrote it the same way
 
Upvote 0
Maybe something like
VBA Code:
Sub gd6noob()
   Dim Ary As Variant
   
   With Sheets("sheet1")
      Ary = .Range("A5", .Range("A" & Rows.Count).End(xlUp)).Value2
   End With
   Sheets("Sheet2").Range("A5").Resize(UBound(Ary)).Value = Ary
End Sub
 
Upvote 0
Solution
Maybe something like
VBA Code:
Sub gd6noob()
   Dim Ary As Variant
  
   With Sheets("sheet1")
      Ary = .Range("A5", .Range("A" & Rows.Count).End(xlUp)).Value2
   End With
   Sheets("Sheet2").Range("A5").Resize(UBound(Ary)).Value = Ary
End Sub
Awesome, this worked... Thank you
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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