简体   繁体   English

Excel参考

[英]Excel Referencing

I am trying to compare a value (for example if D4 >= 10) and if this is true have it pull the data in the column. 我正在尝试比较一个值(例如,如果D4> = 10),并且如果为true,则将其提取列中的数据。 This is to pass information from one table to another in the same excel sheet. 这是为了将信息从一个表传递到同一Excel工作表中的另一个表。 For some reason I cannot seem to do this for a whole range of cells without having a lot of empty space. 由于某种原因,如果没有大量空白空间,我似乎无法对整个单元格执行此操作。 I tried a very basic formula which works but leaves a bunch of cells empty. 我尝试了一个非常基本的公式,该公式可以工作,但是将一堆单元格留空。 This formula is the following: 该公式如下:

=IF(D4>=10, C4, "").

I tried VLOOKUPS and many other referencing formulas like INDEX but cant seem to make it work with the if condition. 我尝试了VLOOKUPS和许多其他引用公式(例如INDEX),但似乎无法使其与if条件一起使用。 I know this is a very basic question but was wondering if anyone can help me out with that. 我知道这是一个非常基本的问题,但我想知道是否有人可以帮助我。

Just to be clear what I am trying to do is to pull the data in the C column if the values in the D column are greater than or equal to 10. This is from one table to another in the same sheet but without any empty cells. 为了清楚起见,我要执行的操作是如果D列中的值大于或等于10,则提取C列中的数据。这是从同一张表中的一张表到另一张表,但没有任何空单元格。 So that it pulls all the values in the C column when the D column has a value of 10 or more in a list. 因此,当D列在列表中的值等于或大于10时,它将提取C列中的所有值。

Thank you in advance. 先感谢您。

Something like this? 像这样吗 The numbers in column D are moved to column F (for example), if greater than or equal to 10, and sorted from largest to smallest: 如果D列中的数字大于或等于10,则移到F列(例如),并从最大到最小排序:

=AGGREGATE(14,6,($D$1:$D$15>=10)*$D$1:$D$15,ROW(1:1))

在此处输入图片说明

Updated based on clarified question: 根据明确的问题进行了更新:

You need to add a column that does this - let's say it's column F, so the formula in F1 is: 您需要添加执行此操作的列-假设它是列F,因此F1中的公式为:

=IF(AND(D1 >= 10, ISNUMBER(D1)), C1, "")

Enter this into the first cell of your target location, then click in the formula bar and press Ctrl + Shift + Enter to enter it: 将其输入到目标位置的第一个单元格中,然后在编辑栏中单击并按Ctrl + Shift + Enter进行输入:

=IFERROR(INDEX(F:F,SMALL(IF($F$1:$F$15 <> "",ROW($F$1:$F$15)),ROW()-ROW($F$1)+1)),"")

Then drag that cell down to fill the columns you want. 然后向下拖动该单元格以填充所需的列。

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

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