ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¦p¦ó¤@¦¸¦X¨ÖÀx¦s®æ

[µo°Ý] ½Ð°Ý¦p¦ó¤@¦¸¦X¨ÖÀx¦s®æ

¦U¦ì¤j¤j¦n¡A




·Q½Ð°Ý¦p¦ó¾Þ§@EXCEL¡A±NAÄ檺ºØÃþÅܦ¨¬O¹³¬OEÄ樺¼ËªºÅã¥Ü¤è¦¡©O?


¦A½Ð¦U¦ì¨ó§U¡AÁÂÁ¤j®a¡C

Sub ¦X¨Ö()
Dim T$, xR As Range, xH As Range
Application.DisplayAlerts = False
For Each xR In Range([A2], [A65536].End(xlUp))
    If xR <> T Then Set xH = xR: T = xR
    If xR(2) <> T Then Range(xH, xR).Merge
Next
End Sub

TOP

¥»©«³Ì«á¥Ñ gaishutsusuru ©ó 2020-5-9 11:51 ½s¿è

¦^´_ 2# ­ã´£³¡ªL


ÁÂÁ­㴣¤j¤j´£¨Ñªº¥¨¶°¼gªk¡CÃö©ó³o­Ó¥¨¶°¬O¥i¥H¾Þ§@ªº¡A¦ý¦]¬°§Ú«á­±´XÄæ·|¦³¼g¤½¦¡¡A¦ý¦]¬°¦X¨Ö«á­ì¥»ªºÀx¦s®æ¤£·|«O¯d¤F¡A©Ò¥H¤½¦¡Åܦ¨·|Ū¤£¨ì­È¡C¦]¦¹·Q½Ð°Ý¦³¨S¦³¿ìªk¦X¨Ö«á¤´«O¯d­ì¥»¦UÀx¦s®æªº­È©O?


¥t¥~·Q½Ð±Ð2­Ó°ÝÃD¡G
(1) ¦pªG­n´_­ì¦¨¥¼¦X¨Ö¤§«eªº¼Ë¤l¡A¥ç§Y±qÄæEÅܦ¨¬OÄæA¨º¼Ëªº¸Ü¡A¸Ó¦p¦ó¼g¥¨¶°©O?

(2) ¦pªG¬O¤â°Ê¥Î¦X¨ÖÀx¦s®æ¥h¾Þ§@¦X¨Öªº¸Ü¡A¦p¦ó°µ¤~¯à«O¯d­ì¨Ó¦U­ÓªºÀx¦s®æ©O?(¦]¬°§Ú¤â°Ê¥Î¸óÄæ¸m¤¤¡A³£·|Åã¥Ü¥u«O¯d¥ª¤W¨¤ªº­È)


¦A³Â·Ð±z©âªÅ´£¨Ñ·Qªk¡AÁÂÁ±z¡C

TOP

¦^´_ 3# gaishutsusuru

Sub ¦X¨Ö()
Dim R&, i&, xA As Range, xZ As Range, T$, xH As Range
R = [A65536].End(xlUp).Row
Set xA = Range("A2:A" & R)
Set xZ = Range("Z2:Z" & R) '­É¥ÎzÄæ·í¦X¨Ö®æ
xA.Copy: xZ.PasteSpecial xlPasteFormats  '½Æ»s®æ¦¡¨ìzÄæ
For i = 1 To xA.Count
    If xA(i) <> T Then Set xH = xZ(i): T = xA(i)
    If xA(i + 1) <> T Then Range(xH, xZ(i)).Merge
Next i
xZ.Copy: xA.PasteSpecial xlPasteFormats '½Æ»s®æ¦¡¨ìaÄæ
xA.Borders.LineStyle = 1 '¥[®Ø½u, ¸Ñ°£¦X¨Ö«á¤´«O¦³®Ø½u
xZ.EntireColumn.Delete '²M°£zÄæ
End Sub

Sub ¦X¨Ö¸Ñ°£()
Range("A:A").UnMerge
End Sub

¥H«á¥ô¦óµo©«­n¦Û¦æ¤W½d¨ÒÀÉ, §K±o§O¤HÁÙªá®É¶¡°µ:
X0001.rar (7.7 KB)


=========================

TOP

¦^´_ 4# ­ã´£³¡ªL


ÁÂÁ­㴣¤j¤jªº¥¨¶°¡C¦nªº¡A¤U¦¸µo¤å«e·|ªþ¤WÀɮסAÁÂÁ±zªº´£¿ô¡C

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD