We help IT Professionals succeed at work.

Conditionally copy paste the data between sheets

225 Views
Last Modified: 2018-08-27
Conditionally copy paste the data between sheets
plz see the sample file
sample.xlsb
Comment
Watch Question

Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thnx Neeraj Sir for ur great support
Subodh Tiwari (Neeraj)Excel & VBA Expert
CERTIFIED EXPERT
Most Valuable Expert 2018
Awarded 2015

Commented:
You're welcome Sachin!
Saqib HusainEngineer
CERTIFIED EXPERT

Commented:
You really did not need to loop. This one liner could have done the same job.

Sub copymultiple()
Sheet5.Range("A1").CurrentRegion.EntireRow.Copy Sheet4.Range("A1").Resize( _
    (Sheet2.Range("A1").CurrentRegion.Rows.Count - 1 + _
    Sheet3.Range("A1").CurrentRegion.Rows.Count - 1) * _
    Sheet5.Range("A1").CurrentRegion.Rows.Count)

End Sub

Open in new window

Author

Commented:
Thnx Saqib Sir for the great info and thnx for the support