Another approach using dictionary [code] Private Sub UserForm_Initialize() Dim arr As Variant arr = GetDistinct(Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)) ListBox1.List =...
Thanks a lot PNRao for this great solution Another approach using collection [code] Private Sub UserForm_Initialize() Dim ws As Worksheet...
Thanks vaali... this is the data sheet1 data EID NAME PAY PayDay 14123 Joe1 $1,234.00 29-Jun-17 14124 Joe2...
HI, Here is the required macro to search a field and if value found copy the whole row into another...
I found a solution like this :Records in between two specific dates easily can be filtered using drop-down lists ....
I found a solution as follows: Watch the video to see how it's done and download example file : https://youtu.be/SZduAoOtiS0
I have sorted the above problem. Code is given below... [code] Sub seperate() Call CleanSheets MsgBox "1 of 10 Cleaning...
I have 2 workbooks in a location C:\new\folder. I want sheet 1 from wb1, sheet3 from wb2 and place it one after the other in another existing workbook wb3 in the same location when i click a button in wb3. can you help me with a code?
New folder (if folder doesn’t exist) is created at the same place with workbook.
The workbook’s sheets as new workbooks are copied in this folder.
Dim Sheet As Worksheet, SheetName$, MyFilePath$, N&
Application.ScreenUpdating = False
MyFilePath$ = ActiveWorkbook.Path & "\" & _
Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4)
.ScreenUpdating = False
.DisplayAlerts = False
On Error Resume Next
For N = 1 To Sheets.Count
SheetName = ActiveSheet.Name
.Name = SheetName
.SaveAs Filename:=MyFilePath _
& "\" & SheetName & ".xls"
.CutCopyMode = False
Application.ScreenUpdating = True
MsgBox "The Process Was Carried Out Successfully", vbInformation
Working Template Can Be Downloaded Here
Hi, Here is the VBA code to copy worksheets from Book1.xlsx and Book2.xlsx into target Workbook. Please create a module in your target workbook and create button to assign the below code:
Dim wb1 As Workbook
'Get1 sheet1 from Book1.xlsx
Set wb1 = Workbooks.Open(ThisWorkbook.Path & "\Book1.xlsx")
Set wb1 = Nothing
'Get1 sheet1 from Book2.xlsx
Set wb1 = Workbooks.Open(ThisWorkbook.Path & "\Book2.xlsx")
Set wb1 = Nothing
'You can save
Hope this helps-PNRao!
Please share using the share button above.
If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.
Found the answer useful and wants to credit the user, then vote the answer (vote up).