?
Solved

If statement and between

Posted on 2011-03-01
3
Medium Priority
?
312 Views
Last Modified: 2012-05-11
Experts, I need to test if D142 is between I18 and J18.  If so, then return 250 otherwise 0.
is this the correct way to write it?  I am not getting the correct answer.
=IF(I18<$D142<J18,250,0)
0
Comment
Question by:pdvsa
  • 2
3 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 2000 total points
ID: 35012520
=IF(AND($D142>I18,$D142<J18),250,0)

Kevin
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 35012523
=IF(AND(I18<$D142,$D142<J18),250,0)
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 35012531
And because you said "between"

=IF(AND(I18<=$D142,$D142<=J18),250,0)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

850 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