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

[µo°Ý] ²¤Æ¥¨¶°µ{¦¡

[µo°Ý] ²¤Æ¥¨¶°µ{¦¡

³Ìªñ¤@ª½¦b­×§ï¥¨¶°µ{¦¡,¦]¬°À´±o¤£¦h,©Ò¥H½Ñ¦h°ÝÃD,½Ð¨£½Ì.
³Â»¶®a±Ú¦U¦ì¼ö¤ß¤H¤hÀ°¦£§Ú¼g¤F¨Çµ{¦¡,§Ú¦Û¤vµy¥[­×§ï¦¨©Ò»Ý­nªº¥¨¶°µ{¦¡,¥H¤U³o­ÓÁöµM§ï¤F¦n´X­Ó¤p®É,¥i¥H¥Î¤F,¦ý§Úª¾¹D¦³«Ü¦h­«½Æªº»y¨¥,¨Ï±o¥¨¶°¶]±o«ÜºC,§Ú¤w¸g¸ÕµÛ­×§ïN¦¸¤F,³£¦æ¤£³q,¤£ª¾¦³¨S¦³¤H¥i¥HÀ°§Úºë²¥¦?
Sub copy_from_Multi_format()
'
' copy_from_Multi_format ¥¨¶°

   With Workbooks("2011 BCMart Multi-Format.xlsx").Sheets("BCM±±ºÞ")
    .Columns("A:CZ").Hidden = False
    Set A = Intersect(.UsedRange, .Range("A:CZ")).SpecialCells(xlCellTypeVisible)
    With Workbooks("VBA Cluster.xlsm")  '½Ð§ï¦¨­n½Æ»s¬¡­¶Ã¯ªº¦WºÙ(¤w¸g¥´¶})
    With Sheets("BCM±±ºÞ")
    .Columns("A:CZ").Hidden = False
    A.Copy Workbooks("VBA Cluster.xlsm").Sheets("BCM±±ºÞ").Range("A1")  '§¹¥þ½Æ»s
   
   End With
   End With
   End With
   
       With Workbooks("VBA Cluster.xlsm")  '½Ð§ï¦¨­n½Æ»s¬¡­¶Ã¯ªº¦WºÙ(¤w¸g¥´¶})
    With Sheets("BCM±±ºÞ")
    Set A = Intersect(.UsedRange, .Range("A:CZ")).SpecialCells(xlCellTypeVisible)
    A.Copy
    .Range("A1").PasteSpecial xlPasteValues '¿ï¾Ü©Ê¶K¤W­È
   End With
   End With
   
    Workbooks("VBA Cluster.xlsm").Activate
    Sheets("BCM±±ºÞ").Select
    Columns("F:F").Select
    Selection.Replace What:="#N/A", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
        
    Workbooks("VBA Cluster.xlsm").Activate
    Sheets("VBA").Select
    Range("B1").Select
End Sub

¬Ý¬Ý«e½ú¶¡ªº¹ï¸Ü¡A²`¦ö¦Û¤v¥\¦³«Ý¥[±j
¦³ªÅ·|±`¨Ó¦¹½m¥\
ÁÂÁ°Õ
ELIOT JENG

TOP

GBKEE ¥ý¶i, ÁÂÁ±z¤S¥Î³Ì²³æªº¨Ò¤l±Ð¾Ç, §Ú¤S¾Ç¨ì¤F, Thanks
Homeman

TOP

§Ú¬Ý¤£©ú (¯u¨S¥Î), ¦ý¦hÁÂGBKEEªº±Ð¾É.  §Ú­n¦h¬Ý´X¦¸¾Ç²ß¾Ç²ß¤@¤U. ¥Þ

TOP

¦^´_ 12# homeman
Intersect ¤èªk ¶Ç¦^ Range ª«¥ó¡A¦¹ª«¥ó¥Nªí¨â­Ó©Î¦h­Ó½d³ò­«Å|ªº¯x§Î½d³ò¡C
  1. Sub Ex()
  2.     With ActiveSheet
  3.     Set isect = Application.Intersect(.Range("A1:E5"), .Range("B1:B100"))
  4.         If isect Is Nothing Then
  5.             MsgBox "¨S¦³ ¥æ¶°ªº½d³ò "
  6.         Else
  7.          MsgBox isect.Address
  8.         isect.Select     '¥æ¶°ªº½d³ò
  9.     End If
  10.     End With
  11. End Sub
½Æ»s¥N½X

TOP

½Ð±Ð¥ý¶i, Set A = Intersect(.UsedRange, .Range("A:CZ")).SpecialCells(xlCellTypeVisible) ³o¬q¥D­n¬O
³]©w­n½Æ»sªº½Æ»sªº½d³ò¶Ü ? ¦³ÂIµLªk²z¸Ñ³]©w³o¤@¬q
Homeman

TOP

ÁÂÁ§Aªº»¡©ú.

TOP

¦^´_ 9# PJChen
¦p¦³ ³o¨ÇOption  ³£¥²¶·¸m©ó ¼Ò²Õªº³»ºÝ
Option Explicit     ³¯­z¦¡ : ¦b¼Ò²Õ¼h¦¸¤¤±j­¢¨C­Ó¦b¼Ò²ÕùتºÅܼƳ£¥²¶·©ú½Tªº«Å§i¡C
Option Compare ³¯­z¦¡ : ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i·í¤ñ¸û¦r¦ê¸ê®Æ®É¡A©Ò¹w³]¨Ï¥Îªº¤ñ¸û¤èªk¡C
Option Base         ³¯­z¦¡ : ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i°}¦C¯Á¤Þªº¹w³]¤U­­¡C
Option Private     ³¯­z¦¡ : ·í¥DÀ³¥Îµ{¦¡¤¹³\¥i¤Þ¥Î¸ó¶V¦h­Ó±M®×®É¡AOption Private Module ¥i¥HÁקK¼Ò²Õ³Q¥~³¡±M®×©Ò¤Þ¥Î¡C¦ý­Y¥DÀ³¥Îµ{¦¡¤£¤¹³\¸ó±M®×¤Þ¥Î®É¡A«h Option Private ¨S¦³§@¥Î¡C

TOP

¤]¥i¥H§R°£ªº¶Ü?ÁÂÁÂ.

TOP

¦^´_ 7# PJChen
§A±N½Æ»sµ{¦¡½X«á,¶K¦b¤w¦³ªºµ{¦¡½X¤U¤è·íµM·|¦b¨º¸Ì¥X²{.
§R±¼  ©Î²¾ ¨ì³»ºÝ  ´N¦n¤F.

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD