1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel 2010 - IF statement as event to trigger macro?

Discussion in 'Business Applications' started by sdtownse, Jan 14, 2013.

Thread Status:
Not open for further replies.
  1. sdtownse

    sdtownse Thread Starter

    Joined:
    Jan 14, 2013
    Messages:
    2
    Hi there,

    To start off, I'm not too bad with excel, but I'm not very familiar with macros.


    Scenario:

    - Working from 3 sheets (1)Payroll sheet (current), (2)Payroll sheet (previous period), (3)Values which have changed when comparing (1) and (2)

    My dilemma:

    The issue is that when new entries are added to (1), it creates a mismatch with (2). I am thinking maybe a macro that runs from an if statement which compares the name fields for each entry and then runs a macro that adds a blank row so that differences will be easier to isolate.

    if('sheet1!'a1='sheet2!'a1,,run macro)

    Am I on point or even at that realistic in my assumption or is there another easier way to get this to work that I am not thinking of..... :confused::confused::confused:

    PS, I hope this makes some sort of sense!

    **ALSO! The rule needs to apply uniqely to about 405,000 records...
     
  2. Garf13LD

    Garf13LD

    Joined:
    Apr 17, 2012
    Messages:
    455
    You can use a vlookup to check for difference.
    As for you If macro, it doesn't exist.
    You can however get macro to add rows for you though.
     
  3. sdtownse

    sdtownse Thread Starter

    Joined:
    Jan 14, 2013
    Messages:
    2
    Not sure how to use vlookup in that way, I hate to be a pest, but any chance you could provide an example?

    Thanks!
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1085186

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice