Copying a Range in two different WorkSheets

zubin

New Member
Joined
Sep 15, 2019
Messages
47
Hi Guys....The code below copies three different ranges to a new location in the same worksheet......


VBA Code:
Sheet1.Range("B4:B14").Copy
    Sheet1.Range("B" & Sheet1.Columns("B").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value
    
    Sheet1.Range("E4:E14").Copy
    Sheet1.Range("D" & Sheet1.Columns("D").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value
    
    Sheet1.Range("F4:F14").Copy
    Sheet1.Range("E" & Sheet1.Columns("E").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value


Everything fine.......but now my requirement has changed and I need that apart from the above ranges being copied simultaneously the below ranges should be copied in sheet4 of the same workbook


Code:
 Sheet1.Range("C4:C14").Copy
    Sheet4.Range("A" & Sheet4.Columns("A").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value
    
    Sheet1.Range("D4:D14").Copy
    Sheet4.Range("B" & Sheet4.Columns("B").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value
    
    Sheet1.Range("E4:E14").Copy
    Sheet4.Range("C" & Sheet4.Columns("C").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value
    
    Sheet1.Range("F4:F14").Copy
    Sheet4.Range("D" & Sheet4.Columns("D").Find("*", , xlValues, , xlRows, xlPrevious).Row + 2).PasteSpecial xlValues
    Selection.Value = Selection.Value

How do I achieve this.....
 
Thi
Hi,​
if only the values must be 'copied' so the better is to use DestinationRange.Value2 = SourceRange.Value2 …​
If the source data contains cells formated as Date so use Value rather than Value2.​
Almost all cells have formulas and most important this range has to be copied two rows below the last occupied row and these ranges keep adding below the last range..
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,214,834
Messages
6,121,874
Members
449,056
Latest member
ruhulaminappu

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