根据范围生成值的公式 [英] Formula to generate a value according to a range

查看:70
本文介绍了根据范围生成值的公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据另一个单元格的范围填充一个单元格.就像如果独立单元格的值在1216之间,则从属单元格将填充为-2,如果独立单元格的值在1620之间,则-120-24然后是N,依此类推:

I want to populate a cell according to the range of another cell. Like if the independent cell has the value between 12 to 16 then the dependent cell will be populated as -2 and if the independent cell has a value between 16 to 20 then -1 and if 20-24 then N and so on:

示例

有公式吗?否则我该怎么做?

Is there any formula or how otherwise can I do it?

推荐答案

假定16位于16-20之间,而不是12-16之间,而N则是OP的文本计数而不是图像:

Assuming 16 is "between" 16-20 rather than "between" 12-16 and that for N it is the text of the OP that counts rather than the image:

=LOOKUP(A1,{12,16,20,24},{-2,-1,"N"})  

负值,零,小于12的数字以及大于或等于24的正数,空格和文本将返回#N/A.

Negative values, zero, numbers less than 12 and positive or greater than 24, blanks and text would return #N/A.

LOOKUP .

这篇关于根据范围生成值的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆