+ Reply to Thread
Results 1 to 6 of 6

macro with if/and conditions

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Naples, Italy
    MS-Off Ver
    Excel 2003
    Posts
    5

    Smile macro with if/and conditions

    Hello Everybody,
    I am in desperate need of a macro (know very little of VBA language) for my database built in excel 2003. For every new record posted I need the macro to alert me (with a msgbox such as "OVER THE LIMIT!!") if record in column B is either "X" or "Y" and record in column "D" is greater than 3000....can anybody help me??? I really appreciate your help. Thanks in advance Leandro

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: macro with if/and conditions

    Hi leandro.fernandez,

    Try this code in the worksheet:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-21-2012
    Location
    Naples, Italy
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: macro with if/and conditions

    Hi xladept,

    your code worked just great. I appreciate your help. Have a wonderful day Leandro

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: macro with if/and conditions

    @ leandro.fernandez

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: macro with if/and conditions

    You're welcome!

  6. #6
    Registered User
    Join Date
    09-21-2012
    Location
    Naples, Italy
    MS-Off Ver
    Excel 2003
    Posts
    5

    Smile Re: macro with if/and conditions

    @ Cutter

    OK got it! sorry for the inconvenience and thanks for taking care of me this time
    Last edited by Cutter; 09-23-2012 at 03:39 PM. Reason: Removed whole post quote

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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