ªð¦^¦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)

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2023-12-8 09:35 ½s¿è

Sub t5()
I = Split("Provider=Microsoft.,Jet.OLEDB.4,.0;Extended Properties=Excel ,8,.0;Data Source=", ",")
If Application.Version > 12 Then I(1) = "ACE.OLEDB.12": I(3) = 12
Set cn = CreateObject("adodb.connection"): cn.Open Join(I, "") & ThisWorkbook.FullName
q = "select F1,left(B,1),B,I from( select F1,F3&F4&F5&F6&F7&F8&F9 "
q = q & "as B,I FROM [" & ActiveSheet.Name & "$A1:K] where I is not NULL)"
[S:V].ClearContents: [s3].CopyFromRecordset cn.Execute(q)
For Each Z In [s3].CurrentRegion
If Z.Value = "" Then Z.Value = Z.Offset(-1, 0)
Next
End Sub

TOP

(¿é¤J½s¸¹12096) googleºô§}:https://hcm19522.blogspot.com/
google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-12-4 08:54 ½s¿è

ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð
°õ¦æ«e:


°õ¦æµ²ªG:



Option Explicit
Sub TEST()
Dim Brr, Crr, i&, j%, R&, T$
'¡ô«Å§iÅܼÆ
Brr = Intersect(ActiveSheet.UsedRange, [A:K])
'¡ô¥OBrrÅܼƬO ¸Ë²±«ü©wÀx¦s®æ­Èªº¤Gºû°}¦C
ReDim Crr(1 To 1000, 1 To 4)
'¡ô«Å§iCrrÅܼƬO¤Gºû ªÅ°}¦C
For i = 3 To UBound(Brr)
'¡ô³]¶¶°j°é!i±q3¨ìBrr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹
   If T <> Trim(Brr(i, 1)) And Trim(Brr(i, 1)) <> "" Then T = Trim(Brr(i, 1))
   '¡ô¦pªGTÅܼƻP i°j°é¦C²Ä1ÄæBrr°}¦C­È(¥B¤£¬OªÅ­È)¤£¦P??´N¥OT¬O¸Ó­È
   If Val(Brr(i, 10)) = 0 Then GoTo i01 Else R = R + 1: Crr(R, 1) = T
   '¡ô¦pªGi°j°é¦C²Ä10ÄæBrr°}¦C­ÈÂà­¼ªº¼Æ­È¬O0?? ´N¸õ¨ì¼Ð¥Ü i01¦ì¸mÄ~Äò°õ¦æ,
   '§_«h´N¥ORÅܼƲ֥[1,¥ORÅܼƦC²Ä1ÄæCrr°}¦C­È¬O TÅܼÆ

   For j = 3 To 9
   '¡ô³]¶¶°j°é!j±q3¨ì9
      If Trim(Brr(i, j)) <> "" Then
      '¡ô¦pªG³vÄæ§P©w¨ä­È¤£¬OªÅ­È
         Crr(R, 2) = Brr(2, j)
         '¡ô¥O²Ä2ÄæCrr°}¦C­È¥HBrr°}¦C²Ä2¦C²Äj°j°éÄæ­È±a¤J
         Crr(R, 3) = Brr(i, j)
         '¡ô¥O²Ä3ÄæCrr°}¦C­È¥HBrr°}¦C²Äi°j°é¦C²Äj°j°éÄæ­È±a¤J
         Crr(R, 4) = Brr(i, 10)
         '¡ô¥O²Ä4ÄæCrr°}¦C­È¥HBrr°}¦C²Äi°j°é¦C²Ä10Äæ­È±a¤J
         Exit For
         '¡ô¥O¸õ¥XjÅܼƪº°j°é
      End If
   Next
i01: Next
[R:U].ClearContents
'¡ô¥Oµ²ªGÄ椺®e²M°£
If R = 0 Then Exit Sub
'¡ô¦pªGRÅܼƬO 0(¥Nªí¨S¦³²Å¦Xªº¸ê®Æ),´Nµ²§ôµ{¦¡°õ¦æ
[R3].Resize(R, 4) = Crr
'¡ô¥O«ü©wÀx¦s®æÂX®i­è¦nªº½d³òÀx¦s®æ­È¥HCrr°}¦C­È±a¤J
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 10# lpk187

Á`ºâ¤F¸Ñ·N«ä¤F
ÁÂÁ¤j¤jºëÅPªº¸Ñ»¡
¤SÂç²M¤F§ó¦hªºÆ[©À¤F

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

¦^´_ 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 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

¦^´_ 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

¥»©«³Ì«á¥Ñ 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

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD