EXCEL 多个范围 - 每个范围需要不同的答案 [英] EXCEL Multiple Ranges - need different answers for each range

查看:34
本文介绍了EXCEL 多个范围 - 每个范围需要不同的答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了几个小时来研究如何做到这一点,这就是为什么我现在将其发布在这里...如果您想根据在另一个单元格中输入的值所在的范围在一个单元格中返回不同的值,那么我已经想出了怎么做!!(请记住,这是针对我的电子表格的,用于计算价格,即 0.99 = 0.99 英镑)

I have spent a few hours working out how to do this which is why im posting it here now... If you want to return different values in a cell based on which range the value entered in another cell comes under then I have worked out how to do it!! (bear in mind that this is specific to my spreadsheet and was for calculating prices i.e. 0.99 = £0.99)

例如:

  1. 如果 G2 高于0"但低于1",则显示0.1"
  2. 如果 G2 高于0.99"但低于5",则显示0.15"
  3. 如果 G2 高于4.99"但低于15",则显示0.2"
  4. 如果 G2 高于14.99"但低于30",则显示0.5"
  5. 如果 G2 高于29.99"但低于100",则显示1.0"
  6. 如果 G2 高于99.99",则显示1.30"

因此,如果 G2 为£18.75",则输入公式的单元格将根据上述值显示£0.50".

So IF G2 was "£18.75" then the cell that this formula is entered in would display "£0.50" based on the value's above.

你会在下面这个问题的答案中看到上面的公式......

You will see the above formula contained within the answer to this question below......

推荐答案

使用

=VLOOKUP(D4,F4:G9,2)

范围为 F4:G9:

0   0.1
1   0.15
5   0.2
15  0.3
30  1
100 1.3

D4 是有问题的值,例如18.75 -> 结果:0.3

and D4 being the value in question, e.g. 18.75 -> result: 0.3

这篇关于EXCEL 多个范围 - 每个范围需要不同的答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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