# Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

Need help with a formula, I'd like it to be something similar to '' =IF(AB2=AC2,"Matches","No Match") '' but instead of if they 100% match I want a 5% variable for example, if Cell A1 contains 12:00 and Cell B1 contains 11:59 I want it to class as matching.
Solved by Z. J. in 13 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 24/11/2017 - 02:52
Hello, Welcome to Got It Pro
User 24/11/2017 - 02:52
Hi there :)
Excelchat Expert 24/11/2017 - 02:53
User 24/11/2017 - 02:53
Just to say this service is amazing,
User 24/11/2017 - 02:53
Need help with a formula, I'd like it to be something similar to '' =IF(AB2=AC2,"Matches","No Match") '' but instead of if they 100% match I want a 5% variable for example, if Cell A1 contains 12:00 and Cell B1 contains 11:59 I want it to class as matching.
Excelchat Expert 24/11/2017 - 02:54
Ok
Excelchat Expert 24/11/2017 - 02:54
but how to quantify this 5%
Excelchat Expert 24/11/2017 - 02:55
You are comparing times only
Excelchat Expert 24/11/2017 - 02:55
right?
User 24/11/2017 - 02:56
Times and dates,
Excelchat Expert 24/11/2017 - 02:56
Ok
Excelchat Expert 24/11/2017 - 02:56
User 24/11/2017 - 02:56
a example would be;
User 24/11/2017 - 02:56
03/11/2017 13:00:00
Excelchat Expert 24/11/2017 - 02:56
type some values on shared sheet and explain
Excelchat Expert 24/11/2017 - 02:57
How to quantify this 5% match?
User 24/11/2017 - 02:58
for example
Excelchat Expert 24/11/2017 - 02:58
tell me
User 24/11/2017 - 02:59
I want the top 1 to say match , because they are the same text,
User 24/11/2017 - 02:59
but the cell A2 and B2 I want to class as matching as well as they're only 1 minute out.
User 24/11/2017 - 02:59
so for example
User 24/11/2017 - 03:00
If A1=B2 or 1 minute out
Excelchat Expert 24/11/2017 - 03:00
ok, only 1 minute tolerance is there
Excelchat Expert 24/11/2017 - 03:00
right>
User 24/11/2017 - 03:00
5 minute tolerance
User 24/11/2017 - 03:00
if possible
Excelchat Expert 24/11/2017 - 03:01
ok
Excelchat Expert 24/11/2017 - 03:05
Done
User 24/11/2017 - 03:05
Thank you
User 24/11/2017 - 03:05
can you paste code
Excelchat Expert 24/11/2017 - 03:05
=if(and(B1-A1>=VALUE("-00:05:00"),B1-A1<=VALUE("00:05:00")),"MATCH","NO MATCH")
User 24/11/2017 - 03:06
you're a super star
User 24/11/2017 - 03:06
Thank you so much.
Excelchat Expert 24/11/2017 - 03:06
Thanks for choosing Got It Pro
Excelchat Expert 24/11/2017 - 03:06
Have a great day

This is the output file from the real Excelchat help session:
This is an example of the expert help you can get. It contains no private user information.

Get instant expert help with Excel and Google Sheets

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.