+ Reply to Thread
Results 1 to 5 of 5

multiple conditions if, and if, then statement

  1. #1
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    multiple conditions if, and if, then statement

    Hi I am trying to write a macro that checks if dates in columns fulfill certain criteria. I would like the value of a certain function to be "12" if the actual outcome is "0". How can i do this?
    The line below that i wrote is not valid.
    Any input is much appreciated!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: multiple conditions if, and if, then statement

    Maybe just this:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: multiple conditions if, and if, then statement

    Thank you for your input, the line of code works. The problem that i have is that i get an compilation error message "end if without block if".
    What am i doing wrong?

    Please Login or Register  to view this content.
    Last edited by MaartenRo; 06-19-2020 at 04:02 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: multiple conditions if, and if, then statement

    Easier to see if you indent the code

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-27-2020
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    425

    Re: multiple conditions if, and if, then statement

    thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IF Statement with Multiple Conditions and Multiple True/False Results
    By ellesutgr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-03-2015, 04:51 PM
  2. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  3. if Statement with Multiple Conditions Help Please
    By bimo in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-02-2014, 09:37 AM
  4. [SOLVED] Multiple conditions for an IF statement
    By mike_vr in forum Excel General
    Replies: 4
    Last Post: 05-18-2012, 06:57 AM
  5. IF Statement with multiple conditions
    By Ladypep in forum Excel General
    Replies: 3
    Last Post: 04-05-2006, 09:50 AM
  6. [SOLVED] If statement using multiple conditions
    By SCOOBYDOO in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 02:05 AM
  7. Multiple conditions for IF statement
    By guilbj2 in forum Excel General
    Replies: 3
    Last Post: 01-10-2005, 01:52 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