Solved

If and between-values in Numbers for iWork or in Excel.

Posted on 2011-03-18
4
414 Views
Last Modified: 2012-05-11
Hi I have a question about how to do something in Numbers in iWork and or in Excel. I want to make a cell do this:

If x - Y = between 0-4 then return 100. If x - y = between 5-9 then return 50. If not any of those return 0.

Is it possible to so something like that in numbers or in Excel?
0
Comment
Question by:guidx
  • 2
4 Comments
 
LVL 81

Assisted Solution

by:zorvek (Kevin Jones)
zorvek (Kevin Jones) earned 50 total points
ID: 35170417
=IF(AND(A1-B1>=0,A1-B1<=4),100,IF(AND(A1-B1>=5,A1-B1<=9),50,0))

Where A1 is x and B1 is y.

Kevin
0
 
LVL 3

Accepted Solution

by:
ssisworo earned 400 total points
ID: 35170419
with formula :

 "IF(A12-B12 <= 4, 100, IF( A12-B12 <= 9, 50, 0))"


and here is screen shot :
 screen
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35170427
A simpler formula:

=CHOOSE(MIN(A1-B1,3),100,50,0)

Where A1 is x and B1 is y.

Kevin
0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 50 total points
ID: 35173799
Kevin, I do not see how your simpler formula will give the desired result.

guidx, Here is my formula

=VLOOKUP(A1-B1,{0,100;5,50;10,0},2)

Saqib
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

705 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now