|
楼主 |
发表于 2024-10-29 08:35
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub 赋分表转换()
' https://club.excelhome.net/thread-1700680-2-1.html
'
' 2024-10-29
Sheet2.Activate
x2 = 2
Do While Not (IsEmpty(Sheet2.Cells(x2, 1).Value))
For i = 1 To 30 Step 5
For j = 20 To 37
If Sheet1.Cells(i, j).Value = Sheet2.Cells(x2, 1).Value Then
Sheet2.Cells(x2, 2).Value = Sheet1.Cells(i + 1, j).Value
Sheet2.Cells(x2, 3).Value = Sheet1.Cells(i + 2, j).Value
Sheet2.Cells(x2, 4).Value = Sheet1.Cells(i + 3, j).Value
Sheet2.Cells(x2, 5).Value = Sheet1.Cells(i + 4, j).Value
End If
Next j
Next i
x2 = x2 + 1
Loop
End Sub
Sub 提取T分()
' 2024-10-29
Sheet1.Activate
x1 = 2
Do While Not (IsEmpty(Sheet1.Cells(x1, 3).Value))
For y = 7 To 10
ysf = Sheet1.Cells(x1, y).Value
For x2 = 2 To 101
If Sheet2.Cells(x2, 1).Value = ysf Then
Sheet1.Cells(x1, y + 4).Value = Sheet2.Cells(x2, y - 5).Value
End If
Next x2
Next y
x1 = x1 + 1
Loop
End Sub
|
评分
-
1
查看全部评分
-
|