# Excel - IF Function Problem - Expert Solution

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

In cell G2, insert an IF function that displays Discount with a â€œYâ€ or â€œNâ€ if the Unit Cost is less than or equal to 100.
Solved by M. S. in 12 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 09/12/2017 - 07:22
Hi
User 09/12/2017 - 07:22
Hello
Excelchat Expert 09/12/2017 - 07:22
I just wanted to confirm that you are looking at creating an IF condition based on the unit cost,right?
User 09/12/2017 - 07:23
That is correct
Excelchat Expert 09/12/2017 - 07:23
User 09/12/2017 - 07:24
No problem, thank you
Excelchat Expert 09/12/2017 - 07:27
I've created the IF Condition
Excelchat Expert 09/12/2017 - 07:27
The condition works as:
Excelchat Expert 09/12/2017 - 07:28
If the number of units is less than or equal to 100, The discount field would be shown as Y
Excelchat Expert 09/12/2017 - 07:28
Else N
Excelchat Expert 09/12/2017 - 07:28
Is that what you are looking for
Excelchat Expert 09/12/2017 - 07:28
Or is the condition the other way round?
User 09/12/2017 - 07:29
So what would go in the logical_test?
Excelchat Expert 09/12/2017 - 07:29
Here my assumption is that the number of units is entered in the cell F2
Excelchat Expert 09/12/2017 - 07:30
So in the logical test, the parameter/value entered would be:
Excelchat Expert 09/12/2017 - 07:30
F2 < = 100
Excelchat Expert 09/12/2017 - 07:30
You can see the formula in the Formula bar
User 09/12/2017 - 07:30
Got it
Excelchat Expert 09/12/2017 - 07:31
User 09/12/2017 - 07:31
Yes
User 09/12/2017 - 07:31
Thank You very much
Excelchat Expert 09/12/2017 - 07:31
Great. Thank you.
Excelchat Expert 09/12/2017 - 07:31
Looking forward to provide you with help very soon :)

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.