Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


excel if statement syntax

Posted on 2016-09-29
Medium Priority
Last Modified: 2016-09-29
Hi experts,

I'm using Excel 2013.

Today’s date is 9/29/2016

In excel the following formula gives me the month part of today’s date. So it gives me 9.

In excel the following formula gives me the year part of today’s date. So it gives me 2016

In excel the syntax for an if statement is like this


I'm working on an if statement.
This is the logic for the if statement I need.

If the month part of today’s date equals 1,2,3,4,5,6
           then set the year to 2016
Else  If the month part of today’s date equals 7,8,9,10,11,12
          then set the year to 2017

So far this is what I have. In the part where i put xxx that's the part I need help with.


Anyone the syntax for the if statement mentioned above?
Question by:maqskywalker
LVL 27

Accepted Solution

Glenn Ray earned 1004 total points
ID: 41821650
You'll just replace the xxx=xxx portion with another logic test, like so:
=If (MONTH (TODAY ())<=6,2016,2017)
LVL 17

Assisted Solution

by:Barry Cunney
Barry Cunney earned 332 total points
ID: 41821656
LVL 34

Assisted Solution

by:Rob Henson
Rob Henson earned 332 total points
ID: 41821737
For future compatibility:

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 36

Assisted Solution

Norie earned 332 total points
ID: 41821854
Try this.


Author Comment

ID: 41822696

Author Closing Comment

ID: 41822698

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question