Share via

IF Functions in Word

Anonymous
2020-07-10T21:49:36+00:00

I'm not sure if using the IF formula in word is the best option but it is what I've found so far. What I'm trying to do is have for example an 8 page document and only have the numbering of the pages in the footer to be the pages of the document and not include the blanks that are in between those pages. So basically it is a 4 page document with blanks.

For the total number of pages this is what I have:  {={SECTIONPAGES\*ARABIC\*MERGEFORMAT}-4} and it works great to give me the value of 4 not 8. 

I need pages 3, 5, and 7 to actually be 2, 3, and 4. Here is what I came up with for that: {={IF{PAGE}="3""{PAGE}-1}+{IF{PAGE}="5""{PAGE}-1}+{IF{PAGE}="7""{PAGE}-1}}. Individually those formulas work to give me the desired result but together I am getting a Syntax Error. (never liked Syntax Errors)

My question is can you use nesting IF functions in Word and if you can, did I do it right? 

Thank you

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2020-07-10T23:55:44+00:00

    There are no headers or footers on the blank pages Word inserts if you use an Odd Page or Even Page section break that results in a blank page. Perhaps this is a solution that would work for you. As for the page numbering, you can use { = { = { PAGE } +1 } /2 }.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2020-07-10T23:53:09+00:00

    Although you can use nested IF fields, it's simpler to use the MOD function to make a single IF field do the work:

    The MOD function (short for the math term "modulo") has two numbers between the parentheses, separated by a comma. It divides the first number by the second number and returns the remainder. When you divide an even page number by 2, the remainder is 0; when you divide an odd page number by 2, the remainder is 1.

    Notice also that the "true" result needs to be a formula (=) field. The empty quotes as the "false" result are optional, but a good practice.

    Because the formula also works on page 1, returning a value of 0, you'll need the "different first page" setting, and put a { PAGE } field in the first page header or footer.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments