Copy & Paste

Closed
Bala - Updated on Nov 2, 2021 at 01:14 PM
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 - Nov 3, 2021 at 08:51 PM
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 responses

vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 259
Nov 2, 2021 at 08:01 PM
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.
0
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".
0
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 259
Nov 3, 2021 at 01:58 AM
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.
0
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).
0
vcoolio Posts 1404 Registration date Thursday July 24, 2014 Status Moderator Last seen September 15, 2023 259
Nov 3, 2021 at 08:51 PM
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.
0