Results 1 to 4 of 4

VBA IF Problem (Fairly Simple)

Threaded View

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Dublin
    MS-Off Ver
    Excel 2010
    Posts
    18

    VBA IF Problem (Fairly Simple)

    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?
    Last edited by LewisLonsdale; 01-08-2015 at 12:16 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help, Formula Won't Carry Through
    By dyzfunctioned in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-25-2013, 01:50 PM
  2. Fairly Simple Formula Question- Any help?
    By Hizuremai in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2012, 12:22 PM
  3. Fairly simple, but need help.
    By littlcor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2006, 03:02 AM
  4. HELLLP!!!! This should be fairly simple I would think!
    By InfinityDesigns in forum Excel General
    Replies: 7
    Last Post: 06-18-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1