"录制宏时光标分别进入公式单元的编辑栏一次",行得通,多谢老师指点. 可是,在连续区域内录的相对引用的单单元格数组公式看起来完全一样,不知录制时有无省力的办法,请继续指教. Range("K1").Select Selection.FormulaArray = "=INDEX(lei_0,MATCH(,COUNTIF(R1C10:RC[-1],lei_0),))" Range("L1").Select Selection.FormulaArray = "=INDEX(lei_0,MATCH(,COUNTIF(R1C10:RC[-1],lei_0),))" Range("M1").Select Selection.FormulaArray = "=INDEX(lei_0,MATCH(,COUNTIF(R1C10:RC[-1],lei_0),))" Range("N1").Select Selection.FormulaArray = "=INDEX(lei_0,MATCH(,COUNTIF(R1C10:RC[-1],lei_0),))" Range("O1").Select Selection.FormulaArray = "=INDEX(lei_0,MATCH(,COUNTIF(R1C10:RC[-1],lei_0),))" Range("P1").Select Selection.FormulaArray = "=INDEX(lei_0,MATCH(,COUNTIF(R1C10:RC[-1],lei_0),))" 还有很多类似语句,..... 还有,点击宏按钮时,页面不停的晃,要加入怎样的语句能使页面不动. |