简体   繁体   English

使用 VLOOKUP 在 Excel 中查找 MODE?

[英]Finding the MODE in Excel with VLOOKUP?

I have a question about finding the MODE in excel.我有一个关于在 excel 中查找 MODE 的问题。 The table below shows 4 different income brackets and then how many families are in each bracket下表显示了 4 个不同的收入等级,然后每个等级有多少家庭

I wanted to ask if its possible to find the MODE of the data set bellow without having to write it down like i did on the right side of the table?我想问是否有可能找到下面数据集的模式,而不必像我在表格右侧那样写下来?

I tried using MAX to find the largest number of families in a single income bracket and then using VLOOKUP to find the corresponding value in the other column, but for some reason it does not work.我尝试使用 MAX 查找单个收入等级中最多的家庭,然后使用 VLOOKUP 查找另一列中的相应值,但由于某种原因它不起作用。

在此处输入图像描述

Use this formula instead改用这个公式

=VLOOKUP(MAX(B23:B26),CHOOSE({1,2},B23:B26,A23:A26),2,0)

Actually, one of the vlookup() 's limitation is to read the array from left to right only.实际上, vlookup()的限制之一是只能从左到右读取数组。 In your problem, you have lookup values on the right side and values to return on the left.在您的问题中,右侧有查找值,左侧有要返回的值。 CHOOSE function here does the job for reversing the data/array for you.在这里CHOOSE为您完成反转数据/数组的工作。

GOOD LUCK祝你好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM