[사무-excel] VBA 패치 필드 내용
650 단어 사무-excel
'A1 B2 C3 D4 E5 F6 G7 H8 I9 J10
'K11 L12 M13 N14 O15 P16 Q17 R18
'S19 T20 U21 V22 W23 X24 Y25 Z26
Public Sub Connect()
Dim KqData, i
Dim result(1 To 10000, 1 To 2)
KqData = Intersect(ActiveSheet.UsedRange, ActiveSheet.Range("A:G"))
For i = 1 To UBound(KqData, 1)
result(i, 1) = "10" & Format(KqData(i, 2)) & Format(KqData(i, 3), "000")
Next i
ActiveSheet.[E1].Resize(UBound(KqData, 1), 1) = result
End Sub