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

[µo°Ý] «ü©w2¦C©Î3¦Cªº¦PÄæ¦P®É³£¦³¼Æ¦r®É¡A«h¼Ð¥Ü©³¦âªº»yªk

[µo°Ý] «ü©w2¦C©Î3¦Cªº¦PÄæ¦P®É³£¦³¼Æ¦r®É¡A«h¼Ð¥Ü©³¦âªº»yªk


(³Ì«á¦³¼Æ¦rªº¦C - 2)©M(³Ì«á¦³¼Æ¦rªº¦C - 3)ªº¤G¦C¤§¦PÄæ³£<>""®É¡A«h¼Ð¥Ü²Hµµ©³¦â¡C

(³Ì«á¦³¼Æ¦rªº¦C - 2)©M(³Ì«á¦³¼Æ¦rªº¦C - 3)©M(³Ì«á¦³¼Æ¦rªº¦C - 4)ªº¤T¦C¤§¦PÄæ³£<>""®É¡A«h¼Ð¥Üª´ºÀ¬õ©³¦â¡C

½Ð°Ý¡JVBA»yªk­n¦p¦ó½s¼g?
ÁÂÁÂÀ°¦£!
´ú¸ÕÀÉ¡J
¨Ì±ø¥ó¼Ð¥Ü©³¦âªº»yªk.rar (6.61 KB)

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2019-4-6 10:31 ½s¿è

Sub ¼Ð¥Ü©³¦â()
Dim r&, c&, k%, Km, xE As Range
r = [a1].End(xlDown).Row
c = [a1].End(xlToRight).Column
Km = Array("", 40, 39, 38)
Range([B2], Cells(r, c)).Interior.ColorIndex = 0
For i = 2 To c
    k = 0: Set xE = Cells(r, i)
For j = r To r - 2 Step -1
    If Cells(j, i) = "" Then Exit For Else k = k + 1
Next
    If k > 0 Then xE(-k + 2).Resize(k).Interior.ColorIndex = Km(k)
Next
End Sub

TOP

google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

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

·PÁª©¥DªºÀ°¦£¡C
°ÝÃD¸Ñ¨M¤F!·P®¦!

TOP

¦^´_ 3# hcm19522


    h¤j¤j:
ÁÂÁ±zªº¨ç¼Æ¸Ñ~·P®¦!

TOP

¦^´_ 4# ziv976688

¬Q¤Ñ¥^¥^°µ, ¥¼¦A¼f¹î, ­×¥¿¤@¤U:
For j = r To r - 3 Step -1  >>> 3 §ï¦¨ 2 ¤~¹ï

TOP

¦^´_ 6# ­ã´£³¡ªL
ª©¥D:±z¦n!
For j = r To r - 3 Step -1
´ú¸Õ¹Lªñ100­Ó½d¨Ò¡Aµª®×³£¥¿½T¡A©Ò¥H¨S¦³µo²{¿ù»~^^"

For j = r To r - 2 Step -1
·PÁ±zªº­×¥¿^^

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2019-4-7 16:14 ½s¿è

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

ª©¥D¤j¤j:±z¦n!
µ²½×¥X¨Ó¤F~
For j = r To r - 3 Step -1
·í³Ì«á4´Á³£¦³¼Æ¦r®É¡A´N·|¦³Bug¤F~²£¥Í°»¿ù¡C

For j = r To r - 2 Step -1
·í³Ì«á4´Á³£¦³¼Æ¦r®É¡A·|¦p»Ý¨D±N³Ì«á3´Áªº¼Æ¦r¼Ð¥Ü«ü©wªº©³¦â¡C

ÁÂÁ±zªº­@¤ß«ü¾É©MÀ°¦£!·P®¦

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2019-4-16 09:16 ½s¿è

¦^´_ 6# ­ã´£³¡ªL
¥DÀÉ&´ú¸Õ¥ÎÀÉ.rar (12.08 KB)
¤£¦n·N«ä¡A¦]¬°¤u§@ªíªº¦C¼Æ¤£ºÉ¬Û¦P¡A©Ò¥Hµ{¦¡°õ¦æ«á¡A¦³²£¥Í¤@¨ÇBug(¸Ô¦p¹Ï¤ù)¡C
·q½Ð±z½ç¥¿!ÁÂÁ±z!
T_1       
T_2       
T_3       

TOP

¦^´_ 9# ziv976688

Sub ¼Ð¥Ü©³¦â()
Dim r&, c&, k%, Km, U&, xE As Range
If IsDate([A2]) = False Then Exit Sub
r = [A1].End(xlDown).Row
c = [A1].End(xlToRight).Column
Km = Array("", 40, 39, 38)
Range([B2], Cells(r, c)).Interior.ColorIndex = 0
U = r - 2: If U > 2 Then U = 2
For i = 2 To c
    k = 0: Set xE = Cells(r, i)
For j = r To r - U Step -1
    If Cells(j, i) = "" Then Exit For Else k = k + 1
Next
    If k > 0 Then xE(-k + 2).Resize(k).Interior.ColorIndex = Km(k)
Next
End Sub

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD