Multiple conditions for if statements in Word

Discussion in 'Word VBA' started by maryjo_3@yahoo.com, Dec 19, 2013.

  1. Guest

    Racking my brain trying to figure out how to do nested multiple if statements in Word...it's not your basic "if..then...else" nor is it simply "and" or "or"...it's more of an "and/or" if statement. Mail merge document, adding astorisks based on state AND major. Here's an example of what I want to do:

    If state = WA and major <> nursing or major <> to dental hygiene or major<> to registered nursing then insert * otherwise nothing.

    I have to do this for 13 different states as well, each with 3 majors...it just keeps adding extra astorisks. Any ideas??
     
    , Dec 19, 2013
    #1
    1. Advertisements

  2. On Thu, 19 Dec 2013 13:51:30 -0800 (PST), wrote:

    >Racking my brain trying to figure out how to do nested multiple if statements in Word...it's not your basic "if..then...else" nor is it simply "and" or "or"...it's more of an "and/or" if statement. Mail merge document, adding astorisks based on state AND major. Here's an example of what I want to do:
    >
    >If state = WA and major <> nursing or major <> to dental hygiene or major <> to registered nursing then insert * otherwise nothing.
    >
    >I have to do this for 13 different states as well, each with 3 majors...it just keeps adding extra astorisks. Any ideas??


    Are the three majors the same for all 13 states? For a given major,
    do multiple states have the same processing?

    --
    Remove del for email
     
    Barry Schwarz, Dec 20, 2013
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Sareimer

    If statements in Word

    Sareimer, Oct 13, 2003, in forum: Word VBA
    Replies:
    1
    Views:
    92
    Word Heretic
    Nov 8, 2003
  2. Kevin R

    If & ElseIf statements

    Kevin R, Jun 14, 2004, in forum: Word VBA
    Replies:
    5
    Views:
    256
    Tom Lavedas
    Jun 15, 2004
  3. DRAFT
    Replies:
    1
    Views:
    107
    Greg Maxey
    May 11, 2005
  4. MichaelB
    Replies:
    5
    Views:
    118
    Dave Lett
    Mar 16, 2006
  5. Diane
    Replies:
    6
    Views:
    169
    macropod
    Dec 1, 2009
  6. Elaine J.

    ending multiple if/with statements

    Elaine J., Apr 8, 2008, in forum: Word VBA
    Replies:
    13
    Views:
    131
    NZ VBA Developer
    Apr 15, 2008
  7. m2work

    "If" statements in Word 2003

    m2work, Oct 30, 2008, in forum: Word VBA
    Replies:
    4
    Views:
    145
    m2work
    Nov 2, 2008
  8. Mongoose
    Replies:
    1
    Views:
    145
    Doug Robbins - Word MVP
    Aug 8, 2009
Loading...