¦X¨ÖÀx¦s®æ¦Û°Ê½Õ¾ã¦C°ª°ÝÃD
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦X¨ÖÀx¦s®æ¦Û°Ê½Õ¾ã¦C°ª°ÝÃD
¥»©«³Ì«á¥Ñ hugh0620 ©ó 2024-5-11 09:47 ½s¿è
¦U¦ì¤j¤j¡Aªþ¥ó¬O§Ú¦b¤u§@³B²z¤Wªº¤@Ó°ÝÃD¡A¦³¦b°Q½×°Ï·j´M"¦X¨ÖÀx¦s®æ"ªº©«¤l¡C
¦ý¨S¦³§ä¨ì¦³Ãö©ó¦X¨ÖÀx¦s®æ«á¦Û°Ê½Õ¾ã¦C°ªªº°Q½×¡C(©Î³\¦³²¨º|¨S¬Ý¨ì¡A¤]½Ð«ü¥¿)
³æ¤@Àx¦s®æ¥i¥H¦bVBA³]©w¦Û°Ê½Õ¾ã¦C°ª¡A¦ý¦b¦X¨ÖÀx¦s®æ§Ú´ú¸Õ´N¤£¦æ¤F¡C
¤@¯ëªí®æ¦h¼Æ·|³]©w¦C¦L¬°"¤@¶¼e«×"¡A¦Cªø´N¤£·|¦³³]¡C(±ø¥ó)
¸ÕµÛ¥ÎChatGPT¨Ó¸Ñµª¡A¦ý¦¨ªG¨S¦³¹F¨ì¡C(À³¸Ó¦³¥i¯à¬O§Ú´yzªº·N«ä¤£°÷²M·¡)
¤]¬Ý¨ìºô¯¸¦³¦b±Ð¦p¦ópºâ¦rªº¦C°ª¡A´N´ê¥Xªþ¥óªºµ²ªG¡C
¤jP¦³¤F¤@Ó¤ñ¸û¥i¥HÅýÀx¦s®æ¤º®e¡A¥i¥H¦b¦rÅé¡B¦r¤j¤p¡BÄæ¼e©T©w¤U¡AÅý¦X¨ÖÀx¦s®æ¥i¥H¦Û°Ê½Õ¾ã¦C°ª¡C
§Úªº¤è¦¡¬O¤ñ¸û²Âªº¡A¥ý¶]¥X¦rÅé¡B¤j¤pªº¦C°ª¸ê®Æ¡A±N¨ä³]©w¬°¤@Ó¬d¸ßªº¸ê®ÆÀÉ¡C
¦b¤@¦¹§@¬°pºâ¦X¨ÖÀx¦s®æ¦Û°Ê½Õ¾ã¡C
ªþ¥ó¦³2Ó¤u§@ªí¡C
²Ä1Ó¼ÒÀÀ¬O¨C¤@¦Cªº¦r¼Æ¡A¨S¦³¶W¹LÄæ¼e¤U¡A¬O¥i¥H¸Ñ¨M±N©Ò¦³¦X¨ÖÀx¦s®æªº¤º®eÅã¥Ü¥X¨Ó¡C
²Ä2Ó¼ÒÀÀ¬O¤ñ¸û¹ê»Ú§@·~±ªº¡A¨C¤@¦Cªº¦r¼Æ¦³¥i¯à·|¶W¹LÄæ¼e¡A¦pªG¹J¨ì³oÓ±¡ªp¡A§Úªº¤èªk´N¨Sªk¸Ñ¨M¡C
¤£ª¾¹D¡A¦U¦ì¤j¤j¦³¨S¦³¨ä¥L§ó¦nªº¤è¦¡¨Ó³B²z²Ä2Ó±ø¥ó¤Uªº¦X¨ÖÀx¦s®æ¦Û°Ê½Õ¾ã¡C
±ø¥ó¡G¦X¨ÖÀx¦s®æ¤U¡A¤£¯à¥Î"¦r«¬²Å¦XÄæ¼e"¡B"¦r«¬¡B¤j¤p¤£¯à½Õ¾ã"¡B"Äæ¼e¬O©T©wªº"¡C
½Ð¤j¤j̤£§[¸Ñ´b¡C
¦X¨ÖÀx¦s®æ¦Û°Ê½Õ¾ã½m²ß.rar (28.89 KB)
|
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-11-29
|
¦^´_ 1# hugh0620
ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾ÇÂǦ¹©«½m²ßVBA,¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò
°õ¦æ«e:
°õ¦æµ²ªG:
Option Explicit
Sub Test()
Dim i&, ii&, Rah, xR As Range
For i = [C65536].End(3).Row To 1 Step -1
If Cells(i, 3).MergeArea.Count > 1 And Cells(i, 3) <> "" Then
Set xR = Cells(i, 3).MergeArea
For ii = 2 To Cells(i, 3).MergeArea.Count
Rah = Rah + xR(ii).RowHeight
Next
Cells(i, 3).UnMerge
Rows(i).AutoFit
xR.Merge
Rows(i).RowHeight = Rows(i).RowHeight - Rah
Rah = 0
End If
Next
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 2# Andy2483
·P®¦ò!!
¥i¥H¦Aקï¤@¤U¶Ü?? (§Ú¦³¸ÕµÛ¥Î§Aªºµ{¦¡½X¥hקï§Ú»Ýnªº¡A¦ý¥¢±Ñ¡A¨þ¨þ¡C)
¥Î3*3ªº¦X¨ÖÀx¦s®æ¼Ò¦¡¡A¥i¥H¦Û°Ê½Õ¾ã¦C°ª¡C
쥻§Ú¥H¬°¥u¬O1Äæ¡A3Ó¦Cªº¦X¨ÖÀx¦s®æ¡Aµ²ªG¬O¡A3Äæ*3¦C¡C |
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 2# Andy2483
³o¬O§Ú¥Î¤ñ¸û²Âªº¤è¦¡¡A¥Î´êªº¤è¦¡§¹¦¨¡A¤£¹L¡AÁÙ¬O¥Î¤F¤@Ó»²§UÄæ¦ì¨Ó³B²z¡C
¦pªGÀx¦s®æ¸ê®Æ¤ñ¸û¦hªº®ÉÔ¡A´N·|¶]±o¤ñ¸ûºC¤@ÂIÂI¡A¦ýÁÙºâ¬O¥i¥H¶¶§Q§¹¦¨¦X¨ÖÀx¦s®æªºÂy°ª¦Û°Ê½Õ¾ã¡C
§Ú±Ä¥Îªº¤è¦¡¤ñ¸û¤g¤èªk¡A±N¦X¨ÖÀx¦s®æªº¤º®e¡A±N¨C¤@¦Cªº¸ê®Æ§ì¥X¨Ó©ñ¦b»²§UÄæ¦ì¤¤¡A
¦b±N»²§UÄæ¦ì¤¤¨C¤@Ó¦r³v¤@ÁÙ즨¸ò¦X¨ÖÀx¦s®æªº¦rÅé¡B¤j¤p¤@¼Ò¤@¼Ë«á¡A
¦ÓÄæ¼e¡A¤]¬O¥ý²Îp¦n¦X¨ÖÀx¦s®æªºÄæ¼e¼Æ¦r¡A¦A®M¥Î³]©w»²§UÄæ¦ìªºÄæ¼e¡A¥Î¦Û°Ê½Õ¾ã¦C°ª¡A¨úªº¦C°ªªº¼Æ¦r¡C
(¦b³oÓ¶¥¬q¬O¥u¦³¤@ÓÀx¦s®æ¡A©Ò¥H¦C°ª¬O¥i¥HVBA¨Ó¦Û°Ê½Õ¾ãªº¡C)
³v¤@±NÀx¦s®æ¤º®e¨C¤@¦C¨Ì¤Wz¤è¦¡³B²z¡A¥i¥H±o¨ì³Ì«áªº¦C°ª¡C
³Ñ¤U´N¬O²Öp¦C°ª´î±¼©T©wÄæ¦ì¦C°ª«á¡A¦A¥§¡¤À°t¨ì¯B°ÊÄæ¦ì³]©w¦C°ª¡C
¤j¤jªº³B²z¤è¦¡¤ñ¸û²²¤¡A¥u¬O¹ï§Ú¨Ó»¡¤ñ¸û©â¶H¡C
(¨S¨ü¹L¤ñ¸û§¹¾ãªº½s½X¡A©Ò¥H¡A³£¬O¥Î³Ìª½Ä±ªº³B²z¤è¦¡¡A¼¶¼gµ{¦¡½X¡C)
¸ó¦C¦X¨ÖÀx¦s®æ_¦Û°Ê½Õ¾ã¦C°ª_§¹¦¨«~.rar (29.08 KB)
|
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-11-29
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-5-17 08:36 ½s¿è
¦^´_ 3# hugh0620
ÁÂÁ«e½ú¦^´_
«á¾Çקï¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò
°õ¦æ«e:
°õ¦æµ²ªG:
Option Explicit
Sub TEST_RxC()
Dim i&, ii&, Rah, CaW, xR As Range, R&, cW, cW1, C%, N
N = 1 '¦pªG«á¤è¦h¥XªÅ¥ÕNȧï¤j¨Ò¦p:1.2,¦pªG«á¤è¦r¤¸³Q¾B¦íNȧï¤p¨Ò¦p:0.8
For i = 1 To [C65536].End(3).MergeArea.Row
If Cells(i, 3).MergeArea.Count > 1 And Cells(i, 3) <> "" Then
Set xR = Cells(i, 3).MergeArea
C = xR.Columns.Count
R = xR.Rows.Count
cW1 = xR(1).Columns.ColumnWidth
For ii = 1 To C
CaW = CaW + xR(ii).Columns.ColumnWidth
Next
For ii = 2 To R
Rah = Rah + xR(ii).Rows.RowHeight
Next
xR.UnMerge
xR(1).Columns.ColumnWidth = CaW + xR.Font.Size / CaW * N
Rows(i).AutoFit
xR.Merge
xR(1).Columns.ColumnWidth = cW1
xR(1).Rows.RowHeight = xR(1).Rows.RowHeight - Rah + xR.Font.Size * 0.5
Rah = 0: CaW = 0
End If
Next
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 1447
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1471
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-11-29
|
¦^´_ 4# hugh0620
ÁÂÁ«e½ú¤À¨É,³o½d¨Ò®¼½ÆÂøªº,®¥³ß¯à¶¶§Q¸Ñ¨M |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¥»©«³Ì«á¥Ñ hugh0620 ©ó 2024-5-17 16:03 ½s¿è
¦^´_ 5# Andy2483
§Ú¥Î¤j¤jªº¤è¦¡¨Ó´ú¸Õ¡AÁÙ®t¤@ÂIÂI¡C
¤j¤jªº²Ä¤@Óª©¥»¡A¤Ï¦Ó¬O¤ñ¸û§¹¬üªº¡A¥u¬O¦pªG¬O¦b3R*3CªºµLªk¥¿±`¨Ï¥Î¡A
¥t¥~¡Aª©¥»1ªº³¡¤À¦n¹³¥u¬O½Õ¾ã¦C1¦Ó¤w¡A»Ýnªºµ²ªG¬O¦C1¸ò¦C3n¥§¡½Õ¾ã¦C°ª¡C
¤j¤jªº²Ä¤GÓª©¥»¡A¦]¬°¦³¥Î¨ì"xR.Font.Size * 0.5"ªºpºâ¡A¦pªG¤µ¤ÑÀx¦s®æªº¦rÅ餣¤@¼Ë®É¡A
xR.Font.Size ´N¬ONull¡A³o¬qµ{¦¡½X´N¨S¦³§@¥Î¡C
¦P¼Ëªº¸òª©¥»1ªº³¡¤À¦n¹³³£¥u¬O½Õ¾ã¦C1¦Ó¤w¡C
§ÚÁÙ¬O¤ñ¸û·Q¥Î¤j¤jªºª©¥»¡A°õ¦æ³t«×¤ñ¸û§Ö¡C
¬Ý¤j¤j¯à¤£¯à§JªA¤Wzªº°ÝÃD¡A¨º´N§ó¦n³Q¨Ï¥Î¡A·P®¦¡C |
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|