¼ÐÃD:
[µo°Ý]
½Ð°ÝVBA ¦P¤@¦C´M§ä¦hÓ±ø¥óªºÈ¸Ó¦p¦ó°µ
[¥´¦L¥»¶]
§@ªÌ:
scjiao
®É¶¡:
2014-6-27 11:59
¼ÐÃD:
½Ð°ÝVBA ¦P¤@¦C´M§ä¦hÓ±ø¥óªºÈ¸Ó¦p¦ó°µ
[attach]18572[/attach]Dear ¤j¤j:
¤p§Ì½Ð±Ð¤@¤U¡A¦pªG§Ú¦b MPS_TEST ¤§¤u§@ªíùØ·Q±o¨ì ¨Ï¥Î¾÷ºØ A ªº§ë产¤é´Á(°_)»P§ë产¤é´Á(¤î)¡A¸ê®Æ¨Ó·½¬O"±Æµ{"¤u§@ªíùتºAÄ檺A¾÷ºØ)¡A¦A¥[¤WI Äæ¬On§ë¤J¡AµM«á·|¦Û°Ê¿ï¦p²Ä5¦C¤SJÄæ~AXÄæùئ³¼Æ¦rªÌ¡A²Ä¤@ӼƦrªÌ¹ïÀ³¤W¤é´Á¬O§ë产¤é´Á(°_)-->¦p4/19, ³Ì«á¤@ӼƦr¹ïÀ³¤W¤é´Á¬O§ë产¤é´Á(¤î)-->¦p4/21¡A½Ð°Ý¯«¤H¤j¤jÌVBA ¸Ó¦p¦ó¼g??
§@ªÌ:
yen956
®É¶¡:
2014-6-27 14:55
¦^´_
1#
scjiao
¸Õ¸Õ¬Ý:
Sub test()
Dim sh1, sh2 As Worksheet
Dim i, j, k As Integer
Set sh1 = Sheets("MPS_TEST")
Set sh2 = Sheets("±Æµ{")
Sheets("±Æµ{").Activate
With sh2
For i = 1 To 35
sh1.Cells(i * 8 - 3, 1).Resize(8, 1) = .Cells(i * 2 + 3, 1)
For j = 10 To 50
.Cells(i * 2 + 3, j).Select
If .Cells(i * 2 + 3, j) <> "" Then
.Cells(3, .Cells(i * 2 + 3, j).Column).Select
sh1.Cells(i * 8 - 3, 2).Resize(8, 1) = .Cells(3, .Cells(i * 2 + 3, j).Column)
sh1.Cells(i * 8 - 3, 3).Resize(8, 1) = .Cells(3, .Cells(i * 2 + 3, j).Column)
k = j
Do
k = k + 1
If .Cells(i * 2 + 3, k) <> "" Then
sh1.Cells(i * 8 - 3, 3).Resize(8, 1) = .Cells(3, .Cells(i * 2 + 3, k).Column)
End If
Loop Until k > 50
If k > 50 Then GoTo nextI
End If
Next
nextI:
Next
End With
End Sub
½Æ»s¥N½X
§@ªÌ:
scjiao
®É¶¡:
2014-6-27 23:33
¦^´_
2#
yen956
ÁÂÁ¤j¤j¡A§Ú¸Õ¸Õ¬Ý
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)