在公式中反转Excel中的列表 [英] Reversing a list in Excel within a formula

查看:98
本文介绍了在公式中反转Excel中的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,有很多方法可以使用助手列来反转列表以将其转换为新列表.我已经编写了一些使用辅助列来反转列表然后使用它的代码.

So there are a bunch of ways to reverse a list to turn it into a new list, using helper columns. I've written some code that does use helper columns to reverse a list and then use it.

我想知道如何在不使用求和产品中使用辅助列的情况下反转列表-例如,

I'm wondering how I would reverse a list without using a helper column for use in a sumproduct - for example,

=sumproduct(Reverse(A1:A3),B1:B3)

推荐答案

这将满足您的要求:

=SUMPRODUCT(INDEX(A:A,N(IF(1,{3;2;1}))),B1:B3)

要使其更具动态性,可以使用以下数组公式:

To make a little more dynamic you can use this array formula:

=SUM(INDEX(A:A,N(IF(1,LARGE(ROW(A1:A3),ROW(A1:A3)))))*B1:B3)

作为数组公式,需要使用Ctrl-Shift-Enter确认,而不是在退出编辑"模式时按Enter确认.

Being an array formula, it needs to be confirmed with Ctrl-Shift-Enter, instead of Enter when exiting Edit mode.

这篇关于在公式中反转Excel中的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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