Related:
- Get help Macro sheet
- Google sheet right to left - Guide
- Windows network commands cheat sheet - Guide
- Little alchemy cheat sheet - Guide
- Mark sheet in excel - Guide
- Excel macro to create new sheet based on value in cells - Guide
1 response
You can't find code to even start? I went straight to Microsoft,and found this example:
It will load any spreadsheet you want, and combine it into your current workbook. So, when you are ready to compare, and you realize that line 1 on sheet1 is line 10 on sheet2, but it was output to your third sheet anyway (not wanting it, because it was found on each sheet), you will realize what kind of processing power you are going to need, depending on your file sizes.
You do understand that in the above example, in order to do a comparison, we would need to load every value for comparison. If it is a line by line comparison, then no big deal, and you would expect to get row 1 back on your third sheet, as row 1 an sheet 1 would not match row 1 of sheet2!
Now, we have not got to the comparison part, because it is important to know what kind of comparison you want. Do you want anything found on sheet1, and not on sheet2 to be placed? Does row X on sheet1 have to match row X on sheet2?
So what is this comparison for?
Sub ImportWorksheet()
' This macro will import a file into this workbook
Sheets("Sheet1").Select
PathName = Range("D3").Value 'example - c:\
Filename = Range("D4").Value 'example - Book1.xlsx
TabName = Range("D5").Value 'example -BookONE
ControlFile = ActiveWorkbook.Name
Workbooks.Open Filename:=PathName & Filename
ActiveSheet.Name = TabName
Sheets(TabName).Copy After:=Workbooks(ControlFile).Sheets(1)
Windows(Filename).Activate
ActiveWorkbook.Close SaveChanges:=False
Windows(ControlFile).Activate
End Sub
It will load any spreadsheet you want, and combine it into your current workbook. So, when you are ready to compare, and you realize that line 1 on sheet1 is line 10 on sheet2, but it was output to your third sheet anyway (not wanting it, because it was found on each sheet), you will realize what kind of processing power you are going to need, depending on your file sizes.
You do understand that in the above example, in order to do a comparison, we would need to load every value for comparison. If it is a line by line comparison, then no big deal, and you would expect to get row 1 back on your third sheet, as row 1 an sheet 1 would not match row 1 of sheet2!
Now, we have not got to the comparison part, because it is important to know what kind of comparison you want. Do you want anything found on sheet1, and not on sheet2 to be placed? Does row X on sheet1 have to match row X on sheet2?
So what is this comparison for?