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

IF Statement/ Format Error

Hi,

I have an IF Statement in ColJ where im trying to establish whether dates in Cols L&D match.

At the moment the dates in both columns match but the IF says no, i suspect this is formatting but am not 100% sure how to amend.

Please find attached.

Thanks
Seamus
test.zip
0
Seamus2626
Asked:
Seamus2626
  • 2
  • 2
2 Solutions
 
zorvek (Kevin Jones)ConsultantCommented:
The date in column D is formatted as text. Use this formula to compare:

=IF(DATE(LEFT(D2,4),MID(D2,5,2),RIGHT(D2,2))=L2,"Yes","No")

Kevin
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

Your values in column D are not dates.

You can use this formula in J2, copied down

=IF(DATE(LEFT(D2,4),MID(D2,5,2),RIGHT(D2,2))=L2,"Yes","No")

cheers, teylyn
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Kevin, the values in column D are not text, they are numbers. They are formatted as General, but they don't represent the dates that Seamus wants to represent.
0
 
Seamus2626Author Commented:
I must request attention to reassign the points, that was meant to be a split.....
0
 
Seamus2626Author Commented:
Thanks again guys!
0
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

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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