Hi Friends,
Please help me for copy entire column as highlighted from sheet2 and paste in sheet1 with end(xl) column function.
I have done code in file but there is gap in coding.
Please help me out for this code.
Regards
Sandeep Kumar
Hi Friends,
Please help me for copy entire column as highlighted from sheet2 and paste in sheet1 with end(xl) column function.
I have done code in file but there is gap in coding.
Please help me out for this code.
Regards
Sandeep Kumar
Hi friends,
Copy entire last to column from sheet2.
Regards
Sandeep Kumar
![]()
Option Explicit Sub sandeep() Dim lr As Long, lc As Long Dim s1 As Worksheet, s2 As Worksheet Set s1 = Sheets("Sheet1") Set s2 = Sheets("Sheet2") lr = s2.Range("B" & Rows.Count).End(xlUp).Row lc = s2.Cells(5, Columns.Count).End(xlToLeft).Column s2.Range(Cells(5, lc - 1), Cells(lr, lc)).Copy s1.Range("A1").PasteSpecial xlPasteValues Application.CutCopyMode = False MsgBox "completed" End Sub
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
Thanks for this.
Sir I forgot a filed, now entered in sheet.
For you reference against I am attaching the file.
Regards
Sandeep Kumar
Merged cells do not work in VBA. Unmerge the cells and change this line of code.
to![]()
s2.Range(Cells(5, lc - 1), Cells(lr, lc)).Copy
![]()
s2.Range(Cells(3, lc - 1), Cells(lr, lc)).Copy
Read this thread
http://www.vbaexpress.com/forum/show...h-merged-cells
and this one
https://www.quora.com/Why-are-people...merge-in-excel
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks