当前位置: 代码迷 >> VBA >> 如何让他向上时不自动变成上一个表格
  详细解决方案

如何让他向上时不自动变成上一个表格

热度:1289   发布时间:2013-02-26 00:00:00.0
怎么让他向下时不自动变成下一个表格
=INDIRECT(TEXT(ROW(1:1),"000")&"!R3C"&COLUMN(A:A),)当我向下复制时他会变成=INDIRECT(TEXT(ROW(2:2),"000")&"!R3C"&COLUMN(A:A),)有没有
我要的效果是 
             a1=INDIRECT(TEXT(ROW(1:1),"000")&"!R3C"&COLUMN(A:A),)     取001表内A3数据

                       a2=INDIRECT(TEXT(ROW(1:1),"000")&"!R103C"&COLUMN(A:A),)取001表内A103数据

                       a3=INDIRECT(TEXT(ROW(1:1),"000")&"!R203C"&COLUMN(A:A),)取001表内A203数据

                       a4=INDIRECT(TEXT(ROW(2:2),"000")&"!R3C"&COLUMN(A:A),)取002表内A3数据

                       a5=INDIRECT(TEXT(ROW(2:2),"000")&"!R103C"&COLUMN(A:A),)取002表内A103数据

                       a6=INDIRECT(TEXT(ROW(2:2),"000")&"!R203C"&COLUMN(A:A),)取002表内A203数据

                       a7=INDIRECT(TEXT(ROW(3:3),"000")&"!R3C"&COLUMN(A:A),)取003表内A3数据

                       a8=INDIRECT(TEXT(ROW(3:3),"000")&"!R103C"&COLUMN(A:A),)取003表内A103数据

                       a9=INDIRECT(TEXT(ROW(3:3),"000")&"!R203C"&COLUMN(A:A),)   取003表内A203数据

                        向下还有很多,就是有规律的,每个页面取三个数据.一个公式向下复制,完全所有工作,请大家帮忙
------最佳解决方案--------------------------------------------------------
可以这样操作:
1、在第一个单元格输入=INDIRECT(TEXT(INT(ROW(A3)/3),"000")&"!R3C"&COLUMN(A:A),)
2、下拉两个单元格
3、把第二、第三单元格中R3C分别改成R103C和R203C
4、选中三个单元格一起下拉,这样将是:前半部TEXT(INT(ROW(A3)/3),"000")每三行增1(即001;001;001;002;002;002;……),而后半部R3C则是每三行一个循环(即R1C;R103C;R203C;R1C;R103C;R203C;……)
你试试...



  相关解决方案