• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

If Statement not returning correct results

Hi Experts,

I have a workbook that contains a sheet populated from a SharePoint site.

Within this sheet I am attempting to add calculated columns for a pivot table.

This is a simple test formula I have inserted in cells W:
=IF((Y2 > X2), "Inflow","Continued")

The results are in the attached file (with the 3 columns and a few rows copied to a new book).

This formula is returning "Continued" whether the date in column Y is greater than the date in column X.

I am looking for it to return "Inflow" if the date in Y is older than the date in X, and "Continued" if the date in Y is more recent than the date in X.

What am I doing wrong?

  • 2
  • 2
1 Solution
Martin LissOlder than dirtCommented:
The columns in your posted sheet don't match your description of the problem and do you realize that the years in column B are 2103 rather than 2013?
SASnewbieAuthor Commented:

Looking at it so long, I didn't even see that!

Corrected the year, and it works just fine.

Thank you!
Martin LissOlder than dirtCommented:
You're welcome and I didn't see it at first either:)

Marty - MVP 2009 to 2013
SASnewbieAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now