Multiple IF Statement in Word

Discussion in 'Word' started by joeness419, May 24, 2018.

  1. joeness419

    joeness419

    Joined:
    May 24, 2018
    Messages:
    3
    Likes Received:
    0
    Hello - really stuck on trying to figure something out at work that would make my life alot easier.

    I have a simple one column table in a word doc with 6 rows. I have bookmarked it as "CET1"

    I would like to have a formula/statement elsewhere in the word doc that is driven off of the SUM value of this table 6 row, 1 column table

    IF SUM of CET1 < 2 then "Reject"
    IF SUM of CET1 >= 2 and < 10 "Approve"
    IF SUM of CET1 >=10 and < 50 "Escalate"
    IF SUM of CET1 >= 50 "Management"

    Thanks!

    Joe
     
    joeness419, May 24, 2018
    #1
    1. Advertisements

  2. joeness419

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    358
    Likes Received:
    32
    You can use a formula field coded as:
    {IF{=SUM(CET1 A:A)}< 2 "Reject" {IF{=SUM(CET1 A:A)}< 10 "Approve" {IF{=SUM(CET1 A:A)}< 50 "Escalate" "Management"}}}

    Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. The spaces represented in the field constructions are all required.
     
    macropod, May 25, 2018
    #2
    1. Advertisements

  3. joeness419

    joeness419

    Joined:
    May 24, 2018
    Messages:
    3
    Likes Received:
    0
    Thanks Macropod - I am new to formulas in Word - would I just paste what you posted above with "Ctrl-F9" into the table?

    Also, I thought the braces were input with Ctrl+Shift+Enter?

    Or, do I need to Insert -> Quick Parts -> Field?

    Thanks

    Joe
     
    joeness419, May 27, 2018
    #3
  4. joeness419

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    358
    Likes Received:
    32
    Please read the reply in full - especially the note.
     
    macropod, May 28, 2018
    #4
  5. joeness419

    joeness419

    Joined:
    May 24, 2018
    Messages:
    3
    Likes Received:
    0
    If I paste what you gave me into the cell of the table in word, remove all of the braces, highlight the text and hit CTRL-F9, it puts the braces in the beginning and end but doesn't actually perform a calculation. Forgive my ignorance but how exactly would I input this into the word doc to make it calculate?
     
    joeness419, May 29, 2018
    #5
  6. joeness419

    macropod Microsoft MVP

    Joined:
    Mar 2, 2012
    Messages:
    358
    Likes Received:
    32
    As previously stated, you need to replace ALL of the braces with field braces, not just the outer ones...
    Once you've done that, selecting the overall field and pressing F9 will cause it to calculate.
     
    macropod, May 30, 2018
    #6
    1. Advertisements

Ask a Question

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.