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

[µo°Ý] excel ¥¨¶°µLªk¹³excel¤º«Ø¤½¦¡¤@¼Ë¶Ü?

[µo°Ý] excel ¥¨¶°µLªk¹³excel¤º«Ø¤½¦¡¤@¼Ë¶Ü?

¥»©«³Ì«á¥Ñ PKKO ©ó 2013-8-10 16:22 ½s¿è

¨Ò¦p
IF COUNTA("a1:a7") >5 then
Rows("1:5").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

©ÎªÌ¬O
dim BB =RANGE("A1")
Rows("1:BB").select

°ÝÃD¤@¡G¥¨¶°¤ºµLªk¨Ï¥Î¤@¯ëEXCELªº¤º«Ø¤½¦¡¶Ü
°ÝÃD¤G¡GRows¤º­n¦p¦ó¿é¤JÅܼÆ(§Ú¥uª¾¹Dcells¥i¥H)
PKKO

¦^´_ 1# PKKO
¤F¸Ñ¸ê®Æ«¬ºAªº¹Bºâ¡A´N¯àª¾¹D¦p¦ó±a¤JÅܼÆ
Rows("1:" & BB).select
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# PKKO

°ÝÃD¤@¡G¥i¥H¥Îexcel¤½¦¡¡A¦ý­n¦b«e­±¥[­Ó¡yapplication¡z¡AµM«á½d³ò«e­n¥[­Órange("½d³ò")

  If Application.CountA(Range("a1:a7")) > 5 Then

TOP

·PÁ¡A¨ü¯q¨}¦h
¦ý·Q½Ð±Ð
Sub AA()
If Application.CountIf(Range("a1:a7", "2")) > 5 Then
Range("B1") = 5
End If
End Sub

¹³³oºØªº¤½¦¡´NµLªk¨Ï¥Î¶Ü?¤@©w­n()¥u¿ï¨ú½d³òªº¤~¯à¨Ï¥Î¦bVBA¤º¶Ü
PKKO

TOP

¦^´_ 4# PKKO

§Ú°O±o¨S¿ùªº¸Ü¡Aexcel¸Ìªº¤½¦¡³£¯à¦bVBA¸Ì¨Ï¥Î¡A
¥u¬O§Aªº¤½¦¡®æ¦¡­n¥´¹ï¡A§A§ï¦¨³o¼Ë´N¯à°õ¦æ¤F¡G

If Application.CountIf(Range("a1:a7"), "2") > 5 Then

§A´N¥ý¼g¥X¤@¯ëªº»yªk¡G=COUNTIF(A1:A7,"2"),
¦ý¬O¦bVBA¸Ì­±½d³ò»Ý­n¥[­Ó"RANGE"¡A©Ò¥H´N·|Åܦ¨¤W­±ªº¼Ë¤l¤F¡A
©Î¬O¶û³Â·Ðªº¸Üª½±µ¿é¤J[A1:A7]¤]¥i¥H¨ú¥NRANGE¡C

If Application.CountIf([a1:a7], "2") > 5 Then

TOP

¦p¹Ï  ¬d¬Ývba¤ä´©ªº¤u§@ªí¨ç¼Æ¦³¨º¨Ç¡C
a.gif

TOP

·PÁ¦U¦ì¤j¤j¡A¤p§Ì¨ü¯q¨}¦h
·Q¦A½Ð±Ð¤@­Ó°ÝÃD
³Ìªñ¬Ý®Ñµo²{¡AVBA¥i¥H¶}±Ò"¤pºâ½L"©Î¬O¥ô¦ó¤@­Óµ{¦¡(¥u­nª¾¹Dµ{¦¡©ñ¸m¦ì¸m§Y¥i)
¦ýVBA¥i¥H¶¡±µ¾Þ§@¨ä¥L³nÅé¶Ü?
EX:¾Þ§@µ§°O¥»¡BEmEditor
PKKO

TOP

·PÁ¦U¦ì¤j¤j
¤p§Ì¬OVBA·s¤â
¦P¼Ë·Q°ÝVBA¬O¤£¬O¥i¥H¶¡±µ¾Þ§@¨ä¥L³nÅé
¦]¬°¦­«eª¦¤å¬Ý¨ì¦³¥ÎVBA±±¨îIE¨Ó¨úºô¤W¸ê®Æ
¦ý¤£¤Óª¾¹D¬O«ç¼Ë¹B§@
¨D¦U¤j¤j¸Ñµª

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤H¤£©È¿ù¡A´N©È¤£§ï¹L¡A§ï¹L¨Ã¤£Ãø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD