返回vlookup中的最大索引值 [英] Return max index value in vlookup

查看:187
本文介绍了返回vlookup中的最大索引值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将一个vlookup与最大功能配对。由于某种原因,每次尝试使用它时,它只返回#ref。

I'm trying to pair a vlookup with a max function. For some reason it only returns #ref every time I try to use it though.

我的工作表如下所示:

      A  -  B  -  C  -  D  -  E  -  F  -  G
1...
5 - Prod5  id1  $100  $125  $155  $110  $150
6...

A:G被命名为buyAverages
C:G被命名为BuyAveragesPrices

A:G is named buyAverages C:G is named buyAveragesPrices

我想做的是有一个vlookup去,在Col A中找到一个值,然后返回该Col中的最高值。例如:

What I want to do is have a vlookup go and find a value in Col A and then return the highest value in that Col. So example:

      A  -  B
1 - Prod5 *return highest price for Prod5

我在B1中写的失败:

VLOOKUP(A1,buyAverages,MAX(buyAveragesPrices))

那么如何实现这种查找?我发现的一切都是如何使用MAX查找值,但是没有什么可以在返回的索引上使用max。

So how do I achieve this lookup? Everything I have found is how to use MAX for the lookup value, but nothing to use max on the returned index.

推荐答案

尝试这个

=MAX(IF(A:A="Prod1",C:G))

这是一个数组公式。即您必须按 Ctrl + Shift + 输入

This is an Array Formula. i.e you have to press Ctrl+Shift+Enter

这篇关于返回vlookup中的最大索引值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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