VBA copy sheet 1 to Array and put relevant information on sheet 2

Peteor

Board Regular
Joined
Mar 16, 2018
Messages
152
Hello! I have a worksheet where Columns A:Z are used. I would like to take all rows on sheet 1 where Column E has a value of "2" AND Column J has a value of "Example", and copy the information from the Entire Row to sheet 2. Row 1 on sheet 1 is just header information. I would also like this on sheet 2.

I recognize this to be a very broad question, and believe this to be done with "CreateObject("scripting.dictionary")"... I would like to understand how to use this class on my own, but am struggling. Any comments would be greatly appreciated...
 
Not a question, JUST informational for the next user. If you ever find yourself doing this, I have found an issue if the source cells have formulas (VLOOKUP()s to another sheet for instance). Users tend to use the following to speed up their macros:

Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.EnableEvents = False


'Do Stuff

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.EnableEvents = True

Make sure you re-enable these BEFORE .AutoFilter.Range.Copy Sheets("sheet2").Range("A1"). If you do not, it will copy the values before the values update, which will be incorrect.

 
Last edited:
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,216,086
Messages
6,128,736
Members
449,466
Latest member
Peter Juhnke

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