简体   繁体   中英

In a formula, access a column (by its number) in Excel

Given that A1 cell contains a number, say 5 (calculated from other input), how do I use this to access the fourth column, ie E:E ?

示例工作表

In the example, how to use the value of A1 to refer to the "baz1" , ... column E?

一种方法是将这个公式放在表格旁边

=CONCATENATE(LEFT(ADDRESS(1,A1),2),ROW(),":",LEFT(ADDRESS(1,A1),2),ROW())

Enter the below formula in cell A5 and drag down,

=OFFSET($A$1,ROW(1:1),$A$1-1)

在此处输入图片说明

Changing cell value A1 , would automatically reflect in the cells A5 to A7 ,

在此处输入图片说明

Using $1:$1048576 to reference the whole worksheet,

=INDEX($1:$1048576, 2, $A$1)
=INDEX($1:$1048576, 3, $A$1)
=INDEX($1:$1048576, 4, $A$1)

copy the values of E2 , E3 , and E4 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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