EXCEL如何显示两个单元格区域的交集?

2024-11-23 11:43:37
推荐回答(2个)
回答1:

=INDIRECT(CHAR(MAX(CODE(LEFT("A1:F5",1)),CODE(LEFT("C1:H3",1))))&CHAR(MAX(CODE(MID("A1:F5",2,1)),CODE(MID("C1:H3",2,1))))&":"&CHAR(MIN(CODE(MID("A1:F5",4,1)),CODE(MID("C1:H3",4,1))))&CHAR(MIN(CODE(MID("A1:F5",5,1)),CODE(MID("C1:H3",5,1)))))

代表C1:F3的区域

回答2:

会用自定义函数吧?

Function INRAN(RAN1 As Range, RAN2 As Range) As String
INRAN = Application.Intersect(RAN1, RAN2).Address
End Function