- ©«¤l
- 34
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 67
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 10
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2016-4-1
- ³Ì«áµn¿ý
- 2021-5-5
|
¦^´_ 1# °¨¯Ç
§Ú§¹¦¨ªº²Ä¤Gª©¡Aµ{¦¡½X¦p¤U¡A½Ð«ü±Ð¡I
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For j = 0 To 23
Cells(9 + j, 19) = "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,"
For i = 0 To 11
'§R°£½ü¥ð
If Cells(34, 4 + i) <> "" Then
Cells(9 + j, 19) = Replace(Cells(9 + j, 19), Cells(34, 4 + i) & ",", "")
End If
'§R°£¥~±J
If Cells(35, 4 + i) <> "" Then
Cells(9 + j, 19) = Replace(Cells(9 + j, 19), Cells(35, 4 + i) & ",", "")
End If
'§R°£®t°²
If Cells(34, 19 + i) <> "" Then
Cells(9 + j, 19) = Replace(Cells(9 + j, 19), Cells(34, 19 + i) & ",", "")
End If
'§R°£¥ð°²
If Cells(35, 19 + i) <> "" Then
Cells(9 + j, 19) = Replace(Cells(9 + j, 19), Cells(35, 19 + i) & ",", "")
End If
Next i
'§R°£¤w¬£
For i = 0 To 13
If Cells(9 + j, 5 + i) <> "" Then
Cells(9 + j, 19) = Replace(Cells(9 + j, 19), Cells(9 + j, 5 + i) & ",", "")
End If
Next i
For i = 0 To 1
If Cells(9 + j, 29 + i) <> "" Then
Cells(9 + j, 19) = Replace(Cells(9 + j, 19), Cells(9 + j, 29 + i) & ",", "")
End If
Next i
'³]©w¾°È¬£¥ô²M³æ
With Range(Cells(9 + j, 4), Cells(9 + j, 15)).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=Cells(9 + j, 19)
End With
With Range(Cells(9 + j, 29), Cells(9 + j, 30)).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=Cells(9 + j, 19)
End With
Next j
End Sub |
|