好命先森
发表于 2022-2-1 07:10:32
=INDIRECT(TEXT(MAX(IF(T(OFFSET(INDIRECT("'"&COLUMN(A:E)&"月'!b1"),ROW($1:$98),))=A2,COLUMN(A:E)/1%%+ROW($2:$99)/1%+1)),"0月!!r00c00"),)
数组三键盘下拉即可
宝华健涟
发表于 2022-2-6 13:30:49
如果姓名超过了99行,要怎么修改呢?
用户邓建强
发表于 2022-2-8 06:48:45
是不是把相应的改成“/1%%%”和“!R0000C00”就可以了。
入梦解石
发表于 2022-2-16 23:55:35
=IFERROR(INDEX(LOOKUP(1,0/COUNTIF(INDIRECT("'"&ROW($1:$5)&"月'!B:B"),A2&"*"),INDIRECT("'"&ROW($1:$5)&"月'!a:a")),MATCH(A2,LOOKUP(1,0/COUNTIF(INDIRECT("'"&ROW($1:$5)&"月'!B:B"),A2&"*"),INDIRECT("'"&ROW($1:$5)&"月'!b:b")),)),"")
杨明亮
发表于 2022-2-17 11:31:20
群里雪神搞出来的=VLOOKUP(A2,T(INDIRECT(INT(ROW($100:$599)%)&"月!"&{"B","A"}&MOD(ROW($100:$599),100)+1)),2,)
胡广
发表于 2022-2-18 17:17:27
啥群?
海中月
发表于 2022-2-20 12:09:18
大佬们值得学习啊
逆境自强
发表于 2022-2-21 17:55:31
我发一个这个
Sub 开整()
Dim 各月, 结果, Sht As Worksheet
Dim Dic As Object
Set Dic = CreateObject("scripting.dictionary")
For Each Sht In Worksheets
If InStr(Sht.Name, "月") Then
With Sht
各月 = .Range("a2:b" & ..End(3).Row)
For i = 1 To UBound(各月)
Dic("'" & 各月(i, 2)) = 各月(i, 1)
Next
End With
End If
Next
With Sheets("根据身份证号得出姓名")
Range("b2:b" & ..End(3).Row).ClearContents
结果 = .Range("a2:b" & ..End(3).Row)
For i = 1 To UBound(结果)
结果(i, 2) = Dic("'" & 结果(i, 1))
Next
..Resize(UBound(结果), 2) = 结果
End With
MsgBox "整完"
End Sub