Copy & Paste

Report
-
Posts
1325
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
November 17, 2021
-
Hello,

I copied Sheet1 Names( A2:A6) and select the Sheet2 Paste Names (B2). The same name paste entire (B) up to end row .

If Sheet2 (A) row value available up to 100 line , we need to paste same name up to ("B") 100 line.
100 lines is not fixed value. today 100 and tomorrow 200 but need to paste up to end row

Need Help on this!

System Configuration: Windows / Firefox 90.0

3 replies

Posts
1325
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
November 17, 2021
240
Hello Bala,

Try the following code placed in a standard module and assigned to a button:-

Sub Test()

Application.ScreenUpdating = False

        With Sheet1.Range("A2", Sheet1.Range("A" & Sheet1.Rows.Count).End(xlUp))
               .Copy Sheet2.[B2]
        End With

Application.ScreenUpdating = True

End Sub


I hope that this helps.

Cheerio,
vcoolio.
Hi Cvoolio,

Thanks for your support.

we need to past sheet2 end row.because Sheet1 have 5 cells only copied and paste same value to match sheet2 "A".
Posts
1325
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
November 17, 2021
240
Hello Bala,

My understanding of your opening post is that you have a range in Column A of Sheet1 which you want to copy/paste to Column B of Sheet2.
The range in Column A of Sheet1 may vary in length but you want whatever the length of the Column A range to be pasted to Column B, Sheet2.

The code above does exactly that but if you have something else in mind then please upload a sample of your workbook to a file sharing site such as WeTransfer or Drop Box then post the link to your file back here.
Please ensure that your sample is an exact replica of your actual workbook showing exact inputs and expected outputs. If your data is sensitive then please use dummy data.

Cheerio,
vcoolio.
Hi Vcoolio,

Issue fixed, Thanks for your support.

i have another one issue.

i have used filter in Sheet1("F") selected #N/A item and copy another sheet. Again move to Sheet1("F"). How to select remaining item and deselect the previous selected items(#N/A).
Posts
1325
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
November 17, 2021
240
Hello Bala,

I don't quite follow your second request so it would be easier for us to understand what you are doing if you upload a sample of your workbook as per my post #3.
Thank you Bala.

Cheerio,
vcoolio.