Simple Tweak in VBA required while copying data from one sheet to another

Jyotirmaya

Board Regular
Joined
Dec 2, 2015
Messages
204
Office Version
  1. 2019
Platform
  1. Windows
I want to copy my data of "Sheet 1" and "sheet 2" to "sheet 3"

I have the following code

Code:
Sub sbCopyRangeToAnotherSheet()
Sheets("Sheet1").Range("A1:P100").Copy
Sheets("Sheet3").Activate
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub

1. Now I want the copied data of sheet1 in sheet3 should be of BLUE color
2. After copying Shee1's data in sheet3, Sheet2's data will copy below to the Sheet1's data & of which Green color.
3. After copying both data Column C will be sorted from smallest to largest.
 
To move incorrect rows to the bottom lines instead of filtering just sort column B.


Thanks ZVI it works

I don't know much more about VBA code, I am just collecting codes for my work to be done easily with some clicks.
Thank you.
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,216,180
Messages
6,129,344
Members
449,506
Latest member
nomvula

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