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

[µo°Ý] ¤£³W«h¸ê®Æ¡A¦p¦ó­«¾ã.....

[µo°Ý] ¤£³W«h¸ê®Æ¡A¦p¦ó­«¾ã.....

½Ð±Ð¦U¦ì¥ý¶i:

¦p¦ó¥Îvbaµ{¦¡¡A±N¸ê®Æ­«¾ã¬°¥k°¼ªº®æ¦¡
§xÃøÂI¦b©ó:¨C¤é³Ì¦h5µ§¡A³Ì¤Ö¬°0µ§¡A¨Cµ§¦ì¸m¤£¤@­P~

©|½Ð¤£§[´£¨Ñ·Qªk¡AÁÂÁÂ~

Snap9.jpg (63.09 KB)

Snap9.jpg

¤£³W«h.zip (11.65 KB)

¦^´_ 1# b31978


    ¸Õ¸Õ¬Ý¡A¤]¤£ª¾¹ï¤£¹ï¡I
  1. Public Sub test()
  2. Dim arr()
  3. aa = Cells(Rows.Count, 10).End(xlUp).Row
  4. xx = WorksheetFunction.CountA(Range("J3:J" & aa))
  5. i = 1
  6. ReDim arr(1 To xx, 1 To 4)
  7. For Each Rng In Range("C3:i" & aa)
  8.     If Rng <> "" Then
  9.         ss = Cells(Rng.Row, 1).MergeArea
  10.         arr(i, 1) = ss(1, 1)
  11.         arr(i, 2) = Cells(2, Rng.Column)
  12.         arr(i, 3) = Rng
  13.         arr(i, 4) = Cells(Rng.Row, 10)
  14.         i = i + 1
  15.     End If
  16. Next
  17. Range("M3").Resize(xx, 4) = arr
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# lpk187

·PÁ¡A·Q¤F«Ü¤[¡A¤@ª½¨S¦³¦³®Äªº«ä¸ô¡AÁÂÁ¤j¤j~ ·P®¦:D

TOP

¦^´_ 3# b31978
¸Õ¸Õ¬Ý
  1. '¤@¯ë¼Ò²Õµ{¦¡½X
  2. Option Explicit
  3. Sub Ex()
  4.     Dim Rng As Range, C As Range, S, Ar(), At(), i As Integer
  5.     Set Rng = ActiveSheet.Range("A3")
  6.     Do While Rng <> ""
  7.         With Rng.Offset(, 2).Resize(Rng.MergeArea.Count, 7)
  8.         'Rng.MergeArea Àx¦s®æªº¦X¨Ö½d³ò
  9.         'Rng.MergeArea.Count ¦X¨Ö½d³òªºCellsÁ`­p
  10.             If Application.CountA(.Cells) > 0 Then '.Cells :³o With ª«¥ó½d³òRangeªºCells
  11.                 '¤u§@ªí¨ç¼Æ CountA ­pºâ½d³ò¤º¦³¸ê®ÆªºCells­Ó¼Æ
  12.                 For Each C In .SpecialCells(xlCellTypeConstants)
  13.                     'SpecialCells ¯S®íÀx¦s®æ (xlCellTypeConstants :¦r¦ê,¼Æ¦r )
  14.                     ReDim Ar(1 To 4)      '­«¸m°}¦C
  15.                     Ar(1) = Rng.Value
  16.                     Ar(2) = Cells(2, C.Column)
  17.                     Ar(3) = C
  18.                     Ar(4) = Cells(C.Row, "j")
  19.                     i = i + 1
  20.                     ReDim Preserve At(1 To i)  '­«¸m°}¦C:Preserve«O¯d­ì¦³ªº¤¸¯À
  21.                     At(i) = Ar
  22.                 Next
  23.             End If
  24.         End With
  25.         Set Rng = Rng.End(xlDown) '¤U¤@­Ó¦³¦X¨Ö½d³òªºRange
  26.     Loop
  27.     If i > 0 Then [M3].Resize(i, 4) = Application.Transpose(Application.Transpose(At))
  28. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE

ÁÂÁ ¦U¦ì¤j¤jªº¨ó§U¡AÀ°¤F¤j¦£¤F¡AÁÂÁÂ~

TOP

¥»©«³Ì«á¥Ñ t_t7225 ©ó 2015-7-23 17:36 ½s¿è
For Each Rng In Range("C3:i" & aa)
    If Rng <> "" Then
        ss = Cells(Rng.Row, 1).MergeArea
        arr(i, 1) = ss(1, 1)
        arr(i, 2) = Cells(2, Rng.Column)
        arr(i, 3) = Rng
        arr(i, 4) = Cells(Rng.Row, 10)
        i = i + 1
    End If
Next


·Q½Ð°Ýb31978¤j¤j
ss = Cells(Rng.Row, 1).MergeArea
        arr(i, 1) = ss(1, 1)
³o¬qµ{¦¡½Xssªº·N«ä¬O¤°»ò?
¬°¤°»ò¥i¥H¤W­±¨º¥yss ¤U­±¨º¥y«o¥i¥HÅܦ¨ss(x,y)«¬¦¡
¥i§_À°¤p§Ì¸Ñ´b¤@¤U

¤£¦n·N«ä,¦b°ÝÃD¤¤­l¦ù°ÝÃD
¦ý¯uªº«Ü·Qª¾¹D...

TOP

¦^´_ 6# t_t7225

¥t¥~ÁÙ·Q°Ý¤@¤U ¬°¤°»òarr(i,1)=ss(1,1)
ss(1,1)ºû«ù¤£ÅÜ«o¥i¥H¦³day1,day2,day3ªºÅܤÆ
¯uªº¦Ê«ä¤£±o¨ä¸Ñ
Áٳ·Фj¤j¸Ñ´b

©êºp¶W¹L3¤ÀÄÁ¨Ó¤£¤Î½s¿è...

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-7-23 20:42 ½s¿è

¦^´_ 7# t_t7225


    ss = Cells(Rng.Row, 1).MergeArea
        arr(i, 1) = ss(1, 1)
³o¤@¬q¥¿½T¬O¼g¦¨
arr(i, 1) =Cells(Rng.Row, 1).MergeArea(1)
.MergeArea¬°¦X¨ÖÀx¦s®æªºValue
¬JµM¬O¦X¨ÖÀx¦s®æ¤]´N¬O¦h­ÓÀx¦s®æ²Õ¦¨ªº¤@­Ó°}¦C¨ä°}¦C¤@¯ë³£¥u¦³²Ä¤@®æ¦³¨äValue
ss = Cells(Rng.Row, 1).MergeArea¨ºss¤]¬OMergeAreaªº°}¦C¡A¥u¬O¤è«K¦b°Ï°ìÅܼƵøµ¡¤¤Æ[¹îMergeArea°}¦Cªººû¼Æ¤Î¤º®e¡AµL¨ä¥L·N¸q¡I
ss·|Åܤƨä¹ê¬OMergeAreaªº°}¦C¦bÅܤÆ

TOP

¦^´_ 8# lpk187


·PÁÂlpk187¤j¤jªº¦^ÂÐ
ª¾¹Darr¡]i,1¡^=ss
¨º§Ú´NÁA¸Ñ³o¬qµ{¦¡½Xªº·N«ä¤F

¦ý¬O°ß¤@ÁÙ¬O¤£¸Ñªº¦a¤è¬O
ss§Ú·í®É¤]¬O´¢´ú¬°°}¦C

¦ý¬O¤£©ú¥Õªº¦a¤è¬Oss¡]1¡A1¡^
¦pªGss¬°°}¦C¨ä°}¦C­ÈÀ³¬°ss¡]day1,day2,day3¡^
¨ºss¡]1,1¡^¤£¬OÀ³¸Ó©T©w¬°¡¥¡¦day1¡¥¡¦
ss¡]2,1¡^=¡¨day2¡¨³o¼Ë¤~¹ï¶Ü¡H
ÁÙ¬O³o³¡¤À§Ú¦³»{ª¾¿ù»~©O¡H

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-7-23 22:15 ½s¿è

¦^´_ 9# t_t7225


    SS¥u¬O¤@­ÓÅܼơA¬O¤@­Ó¨S¦³©w®æ¤lªº°}¦C¡A¨C¦¸°õ¦æ®É¨Ã¤£¬Û¦P
¤£¹³arr(1 to 3)³oºØ¡A¦Ó¬O·|¹³¤U­±¨Ò¤l¤@¼Ë
§â¤U­±¥N½X°õ¦æ¬Ý¬Ý¦A¬Ý°Ï°ìÅܼƵøµ¡´N¤F¸Ñ¤F
Public Sub ex1()
'²Ä¤@¦¸°õ¦æar
ar = Array("1", "2", "3", "4")
'ar¬°ar(0)="1",ar(1)= "2" ,ar(2) = "3",ar(3) = "4"
'²Ä¤G¦¸°õ¦æar
ar = Array("1", "2")
'ar¬°ar(0)="1",ar(1)= "2"
End Sub
¥H­ì¨Óªº¥N½X¬O¶]°j°éªº©Ò¥H°õ¦æ°_¨Ó´N¦³ÂIÃþ¦ü¤W­±¨Ò¤lªº¼Ë¤l

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD