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

[µo°Ý] ½Ð±Ð»yªk¬O­þ¸Ì¥X°ÝÃD¡H

¦^´_ 10# GBKEE
·PÁª©¥D¡A§Ú¤S¾Ç¤F¤@½Ò¡C

TOP

¦^´_ 11# skyutm
°ÝÃD¤S¨Ó¤F¡A¤S¦³¤@­Ó¸Ñ¤£¶}ªº°ÝÃD¡A¦b¨q¥X¤¤¤å¦r®É¡A¬O¤£¬O¦b¤¤¤å¥[¤W""´N¥i¥H¤F¡AµM«á¥[¤W&´N¥i¥H³sµ²ÅܼơA³sµ²¤@­ÓÅܼƨS°ÝÃD¡A¥i¬O§Ú­n¦A¥[²Ä¤G­ÓÅܼƮɡA´NÅã¥Ü»yªk¿ù»~¡H¤£À´¡A·Ð½Ð¸Ñ´b¡A¤£³Ó·P¿E¡I¡]§Ú·Q¨q¥X¡H¦~¡H¯Z¡^

    '´Á¤¤¦¨ÁZ¼ÐÃD'
    Dim a1, a2
    a1 = Sheets("°ò¥»³]©w").Range("j1").Value
    a2 = Sheets("°ò¥»³]©w").Range("j2").Value
    With Sheets("´Á¤¤¦¨ÁZ")
    .Range("b2").Value = "·s¸ô°ê¥Á¤p¾Ç" & a1&"¦~"

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-8-29 06:35 ½s¿è

¦^´_ 12# skyutm
& ¹Bºâ¤l»P«e«áªº¦r¦ê©ÎÅܼƶ·ªÅ¤@®æ
&»P«e­±³s±µªº¦r¦ê©ÎÅܼƪŤ@®æ , ¨t²Î·|¦Û°Ê¦b&«áªÅ¤@®æ
A= B &C                 ¨t²Î·|¦Û°Ê¦b&«áªÅ¤@®æ    A= B & C
A=B &C &D &E   ¨t²Î·|¥u·| ¦b&«áªÅ¤@®æ    A= B & C & D & E

TOP

¦^´_ 13# GBKEE
·PÁª©¥D¤j¤j¡A§Ú¤S¾Ç¨ì¤F¤@½Ò¡C­ì¨Ó¥u¬O¤@­ÓªÅ®æ¤§®t¡C±q¾Ç²ßvba¥H¨Ó¡A§Úªº¤ß±o´N¬O¡G§O¤H¼gªº¤£ºâ¡A¦Û¤v­n¸Õ¹L¤~ª¾¹D¡A·íÀY¸£¥´µ²®É¡A´N­n»°§Ö°Ý¤H¡A¤£µM·|­ì¦a¥´Âà¡I

TOP

¦^´_ 13# GBKEE
©êºp¡I§Ú¤S¨Ó¥´ÂZ¤F¡C¤W¦¸¦³°Q½×¹L¡C¦ý¬O³o¤@¦¸¦³°µ­×¥¿¡A«o¥X²{°ÝÃD
»yªk¦p¤U¡G
    Dim a11 As Integer, b11 As Integer, c11 As Integer, d11 As Integer, e11 As Integer, f11 As Integer, x11 As Integer
    a11 = b11 = c11 = d11 = e11 = f11 = 0
    myrowcount = Sheets("°ò¥»³]©w").Range("j3").Value + 5
    For x11 = 6 To myrowcount
    Set myrange = Sheets("´Á¤¤¦¨ÁZ").Range("c" & x11)
    Select Case myrange
        Case 100
            a11 = a11 + 1
        Case 90 To 99
            b11 = b11 + 1
        Case 80 To 89
            c11 = c11 + 1
        Case 70 To 79
            d11 = d11 + 1
        Case 60 To 69
            e11 = e11 + 1
        Case 0 To 59
            f11 = f11 + 1
    End Select
    Next x11
    Sheets("´Á¤¤¦¨ÁZ").Range("c108").Value = a11
    Sheets("´Á¤¤¦¨ÁZ").Range("c109").Value = b11
    Sheets("´Á¤¤¦¨ÁZ").Range("c110").Value = c11
    Sheets("´Á¤¤¦¨ÁZ").Range("c111").Value = d11
    Sheets("´Á¤¤¦¨ÁZ").Range("c112").Value = e11
    Sheets("´Á¤¤¦¨ÁZ").Range("c113").Value = f11
­×¥¿ªº¦a¤è¡A¬O§â0~9 10~19 20~29 30~39 40~49 50~59 ¥þ³¡§ï¦¨0~59 ¡A°ÝÃD¦b©óÅã¥Ü100¦³´X¤Hªº¦a¤è·|¥X²{-1

TOP

©êºp¡I§Ú¤S¨Ó¥´ÂZ¤F¡C¤W¦¸¦³°Q½×¹L¡C¦ý¬O³o¤@¦¸¦³°µ­×¥¿¡A«o¥X²{°ÝÃD
»yªk¦p¤U¡G
    Dim  ...
skyutm µoªí©ó 2012-8-29 23:48


¸g´ú¸Õªºµ²ªG,
­Y°õ¦æ¹L a11 = b11 = c11 = d11 = e11 = f11 = 0 ¥H«á,
a11 ©T©w·|³Q§ï¦¨ -1
§Ú²q¦³¥i¯à¬O¸Ó«ü¥O³Q¸Ñ´·¦¨ :
a11= (a11 = 0) (¤¤¶¡ªº«ü¥O³£³Qª½±µ©¿²¤±¼¤F)
·|³o¼Ë§PÂ_¬O¦]¬°¤W¦¡­Y§ï¬° = 1 ©Î = 5 ®É,
a11 ³£·| = 0
¦Ó­YÅܧ󤤶¡°Ñ¼Æ¦WºÙ«h¨º¨Ç°Ñ¼Æ­È³£¤£·|ÅÜ. (µM¦Ó­Y¦³«D¨Æ¥ý©w¸qªº°Ñ¼Æ¦WºÙ¥X²{,«h·|·s¼W¸Ó°Ñ¼Æ¥X¨Ó)

°½Ãiªº¤èªk¬O¦b¸Ó¦æ«á¦A¥[¤W¤@­Ó :
a11 = 0

©Î¬O±N¸Ó¦æ§ï¦¨ :
a11 = 0 : b11 = 0 : c11 = 0 : d11 = 0 : e11 = 0 : f11 = 0

¨ä¹ê¤£¶]¸Ó¦æ¤]¬O¥i¥Hªº,
¦]¬°¾ã¼Æ©ó Dim «áªì­È¥»¨Ó´N¬O 0

C ªº»yªk¦³¨Ç¬O¤£¯à¦b Basic ¤W¥Îªº,
¦]¬°¥i¯à·|³y¦¨«D§Ú­Ì©Ò¹w´Áªºµ²ªG.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-8-30 07:01 ½s¿è

¦^´_ 15# skyutm
³o¨ÇÅÜ¼Æ a11 , b11, c11, d11, e11, f11    Dim   As Integer  µ{§Ç©|¥¼µ¹­È®É ³£¬° 0     
³o¦¡¬O¦h¦¹¤@Á|  a11 = b11 = c11 = d11 = e11 = f11 = 0   ¶Ç¦^   True ©Î False   (++=+ ,  +-=- , --=+)
  1. Option Explicit
  2. Sub Ex()
  3. Dim xlBoolean As Boolean
  4. Dim a11 As Integer, b11 As Integer, c11 As Integer, d11 As Integer, e11 As Integer, f11 As Integer
  5. a11 = b11
  6. xlBoolean = a11
  7. Debug.Print xlBoolean & " " & a11 '§Y®É¹Bºâµøµ¡²×¥i¹î¬Ý
  8. a11 = b11 = c11
  9. xlBoolean = a11
  10. Debug.Print xlBoolean & " " & a11
  11. a11 = b11 = c11 = d11
  12. xlBoolean = a11
  13. Debug.Print xlBoolean & " " & a11
  14. a11 = b11 = c11 = d11 = e11
  15. xlBoolean = a11
  16. Debug.Print xlBoolean & " " & a11
  17. a11 = b11 = c11 = d11 = e11 = f11
  18. xlBoolean = a11
  19. Debug.Print xlBoolean & " " & a11
  20. a11 = b11 = c11 = d11 = e11 = f11 = 0
  21. xlBoolean = a11
  22. Debug.Print xlBoolean & " " & a11
  23. End Sub
½Æ»s¥N½X

Boolean ¸ê®Æ«¬ºABoolean ÅܼƫY¥H 16 ¦ì¤¸( 2 ­Ó¦ì¤¸²Õ)¼Æ¦rªº§Î¦¡Àx¦s¡A¦ý¥u¯à¬O True ©Î¬O False¡CBoolean Åܼƪº­È¤£¬O True ´N¬O False ( ¦b¨Ï¥Î Print ªº®É­Ô )¡A©Î¬O #TRUE# ©M #FALSE# ( ¦b¨Ï¥Î Write # ªº®É­Ô )¡C¨Ï¥ÎÃöÁä¦r True »P False ¥i±N Boolean Åܼƫü©w¬°³o¨â­Óª¬ºA¤¤ªº¤@­Ó¡C
·íÂà´«¨ä¥Lªº¼Æ­È«¬ºA¬° Boolean ®É¡A0 ·|Âন False¡A¦Ó©Ò¦³¨ä¥Lªº­È«hÅܦ¨ True¡C·íÂà´« Boolean ­È¬°¨ä¥Lªº¸ê®Æ«¬ºA,®É¡AFalse ¦¨¬° 0 ¡A¦Ó True ¦¨¬° -1¡C

TOP

¦^´_ 17# GBKEE
©êºp¤S¥´ÂZ¤F¡I¦]¬°³Ìªñ¹J¨ì¤@¨Çµ²¸Ñ¤£¶}¡C©Ò¥H´N§â»yªk­«·s¾ã²z¤@¤U¡A¦]¬°·íªì¦h¬O¾a§O¤HÀ°¦£ªº¡A©Ò¥H¦³¨Ç¤@ª¾¥b¸Ñ¡Aª¾¹Dª©¥D¥\¤O²`«p¡A¯S¨Ó½Ð±Ð¤@¤U¡A¦p¦³¥pÂZ¡AÁٽШ£½Ì¡C´N¬O³o¤@¥y
    '´Á¤¤µû¶q¦Û°Ê¿é¤J®y¸¹¡õ'  ¡]³o§Úª¾¹D¡^
    If Intersect(Target, [J1:J3]) Is Nothing Or [j3] = 0 Then Exit Sub  ¡]§Ú¥uª¾¹D«á­±¡G¦pªG¨S¶ñ¸ê®Æ©Îj3¬O0 »yªk´N¤£°õ¦æ¡A¦ý«e­±¤£À´¡^
    ReDim ar(1 To [j3])    ¡]¤£À´¡^
    YC = [j1] & Format([j2], "00")   ¡]¤£À´¡^
    For i = 1 To [j3]   ¡]ÁA¸Ñ¡^
    ar(i) = YC & Format(i, "00")  ¡]¤£À´¡^
    Next   ¡]ÁA¸Ñ¡^
    With Sheets("´Á¤¤µû¶q")    ¡]ÁA¸Ñ¡^
    .Cells.Rows.Hidden = False  ¡]©Ò¦³Àx¦s®æ¤£ÁôÂá^
    .Cells.Columns.Hidden = False  ¡]©Ò¦³Àx¦s®æ¤£ÁôÂá^
    .[A:A] = ""  ¡]¤£À´¡^
    .[a3].Resize([j3], 1) = Application.Transpose(ar)  ¡]¤£À´¡^
    .Range("W1", .Cells(1, .Columns.Count)).EntireColumn.Hidden = True¡]w1¨ìÁ`­p´X¦C³£ÁôÂá^
    .Range(.[a3].Offset([j3], 0), .Cells(Rows.Count, 1)).EntireRow.Hidden = True  ¡]¤£À´¡^
    .Range("a1").Value = "®y¸¹"   ¡]ÁA¸Ñ¡^
    End With   ¡]ÁA¸Ñ¡^
    '´Á¤¤µû¶q¦Û°Ê¿é¤J®y¸¹¡ô'  ¡]ÁA¸Ñ¡^

TOP

¦^´_ 18# skyutm
Application.Transpose(ar) ¬O¨Ï¥Î¤u§@ªí Âà¸m¨ç¼Æ  ¥»©« 10# ¤w¦³¤¶²Ð¦p¦ó¨Ï¥Î¤u§@ªí
¹ï©ó¤£À´ªºVBA  ¤èªk, ÄÝ©Ê, ¨ç¼Æ ¥i¦h¬Ý VBA¤¤ªº»¡©ú½m²ß¥¦ªº½d¨Ò ·|¶i¨Bªº
³o¦³¾ã²z   ·s¤â VBA ¤Jªù±`¨£°ÝÃD

TOP

¦^´_ 19# GBKEE
³ø§iª©¥D¤j¤H¡A¤p§Ì§Ú¤S¹J¨ì²~ÀV¤F¡A¦]¬°¦b­Ó¤H¦¨ÁZ³æ¿é¥X¤è­±¹J¨ì°ÝÃD¡AÁ`¦¨ÁZ³æ¤w¸g§¹¦¨¡A¤]´N¬O»¡¸ê®Æ¦p¤U¡G
®y¸¹  ©m    ¦W  °ê»y  ­^»y  ¼Æ¾Ç  ¦ÛµM  ªÀ·|
001  ¬Y¬Y¬Y   90      100    85      75     90
¦ý¦b¦¸­¶ªº­Ó¤H¦¨ÁZ³æ¡A§Ú·Q¿é¥X¦¨¬°a4­¶¤j¤p¡A¨C­¶¦³8µ§¸ê®Æ¡A§Úª¾¹D³Ì²³æ«o³Â·Ðªº¤èªk¡A´N¬O§â¨Cµ§¦¨ÁZ¡A§Q¥Î¬Û¹ïÀ³ªº¦ì¸m¡A¿é¤J¨ì­Ó¤H¦¨ÁZÄæ¦ì¡A¦ý¬OµLªk±±¨î¸ê®Æªº¼Æ¶q¡A¦]¬°¦³´Xµ§¦¨ÁZ¡A¬O¥Ñ¡u°ò¥»³]©w¡v¤u§@ªíªº¯Z¯Å¤H¼ÆÄæ±±¨îªº¡A¸Ó«ç»ò¿ì©O¡H¦³¨S¦³¨ä¥Lªººc·Q©O¡Hªþ¤WÀÉ®×¥H«K°Ñ¦Ò¡I

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD