Hello everyone I'm fairly new and would love to start using Excel VBA properly and well. Anyway my first problem is trying to information from 5 workbooks onto one (Ive simplified this to just two.), I have already done a lot of the hard work (I hope), its just an IF statement which is annoying me. Do not worry about the file names, I have had to edit them as I am currently on an internship for a big company which I'm sure wouldnt want the name of their personal files broadcast on the internet.
Sub PasteIt()
Dim u As Workbook
Dim z As Workbook
Set u = Workbooks.Open("Y:file1.xlsx")
Set z = Workbooks("Main file.xlsm")
Workbooks("file1.xlsx").Activate
If Range("B4:B500000").Value Like Date Then
ActiveCell.EntireRow.Select
Selection.Copy
End If
Workbooks("Main file.xlsx").Select
Range("A65536").End(xlUp)(2, 1).Select
ActiveSheet.Paste
End Sub
Bold and Italics is a mismatch error, any way I can fix this please anyone?
Bookmarks