Dear ¤j¤jÌ
¤p§Ì¹J¨ì¦Cªº½ÆÂø/§R°£»P¶×¤J¤Wªº°ÝÃD
¸Ôz¦p¤U:
§Ú»Ýn±N
1. Sheet1¤¤¦³ºÃ°Ýªº¸ê®ÆÂà¨ìsheet2¤¤
2. ±NSheet1¤¤¦³ºÃ°Ýªº¸ê®Æ§R°£ (¦]Sheet2ªº¸ê®Æ¼á²M«á,»Ýn¦b¶×¦^Sheet1¤¤,·|ÁקK¸ê®Æ«ÂЪº±¡ªp¤U,»Ýn¥ý¦æ§R°£)
3.Sheet2ªº¸ê®Æ¼á²M«á,»Ýn¦b¶×¦^Sheet1¤¤ (ÁÙ¨S¦³¼g)
§Ú¦bVBA¼gªk
1.±NSheet1¤¤¦³ºÃ°Ýªº¸ê®ÆÂà¨ìsheet2¤¤
x = 0
K = 0
Do Until Sheet1.Cells(7 + x, 12) = ""
If Sheet1.Cells(7 + x, 6) <> "" Then
Sheet1.Rows(7 + x).Copy
Sheet2.Select
Sheet2.Rows(7 + k).Select
ActiveSheet.Paste
k = k + 1
End If
2. ±NSheet1¤¤¦³ºÃ°Ýªº¸ê®Æ§R°£
x = 0
Do Until Sheet1.Cells(7 + x, 12) = ""
For J = 0 To x
If Sheet1.Cells(7 + J, 6) <> "" Then
Sheet1.Rows(7 + J).Delete
End If
Next J
x = x + 1
Loop
¥i¬O³o¼Ëªº¼gªk¦b°õ¦æ¤W¤ñ¸ûºC,½Ð°Ý¤j¤j¬O§_¦³¸û¦nªº¤èªk
¥t¥~²Ä3.±N¸ê®Æ¶×¦^sheet1¤]¦³ÂI¥d¦í,¬ß¯à°÷¦³´£ÂI¤@¤U
³o¬O§Úªº¼gªk,¤£¹L§Ún¶Kªº¬O±qªÅ¥Õªº¦a¤è±µ¸ê®Æ,¦ý¬O°õ¦æ«á,Àˬd¸ê®Æ,«o¨S¦³¦¨¥\
x = 0
k = 0
Do Until Sheet2.Cells(7 + x, 6) = ""
If Sheet1.Cells(7 + k, 12) = "" Then
Sheet2.Rows(7 + x).Copy
Sheet1.Select
Sheet1.Rows(7 + k).Select
ActiveSheet.Paste
x = x + 1
End If
k = k + 1
Loop |