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

[µo°Ý] INDIRECT«á¨ú­È

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-5-28 12:45 ½s¿è

¦^´_ 1# yc1031


²Ä¤G¨B, ¦bC3~G1000Äæ¦ì¸Ì±a¤J¤À§Oªº¤u§@ªí¸ê®Æ, ¥ÎINDIRECT¤£¦¨¥\

­n¥Î³æ¤Þ¸¹ ' §âSheet¦W¤l ¥]°_¨Ó ¦b¥[ Åå¹Ä¸¹ !

C3¡G=IF(INDIRECT("'"&$C$1&"'!"&ADDRESS(ROW()+1,COLUMN()-1))="","",INDIRECT("'"&$C$1&"'!"&ADDRESS(ROW()+1,COLUMN()-1)))¡@¡@

¥k©Ô¤U©Ô



²Ä¤T¨B, ¦b¶K¤J­È°Ï, §âC3~G1000ªº"­È", ¶K¤W¨ìJ3~P1000, ¶K¤J­È¤£¦¨¥\

Range("J3:P1000") = Range("A3:G1000").Value

¦pªG§A²Ä3¨B¶K¤Wªº­È¬O­n¤@ª½©¹¤U²Ö¥[ªº¶K¡A¦Ó¤£¬OÂл\­ì¥»¸ê®Æªº¸Ü

¨º²Ä2¨B¤]¤£«Øij¥Î¨ç¼Æ°µ¡A²Î¤@¥Î¥¨¶°°µ·|¤ñ¸û¦n

(¥u­nÀx¦s®æ¦³¨ç¼Æ¡A¤£½×¦³µL¼Æ­È¡A¹ï©ó¥¨¶° End ¤èªk¨Ó»¡¡A³£¬O¦³­È)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-5-28 13:16 ½s¿è

¦^´_ 2# n7822123


¨ú¤u§@ªí¦WºÙ°Ïªº¤½¦¡µLªk¦Û°Ê§ó¥¿, ¦³¨S¦³¿ìªk¥i¥H¦Û°Ê? (¦]¬°¤é«á¦³¥i¯à¤@ª½¼W¥[¤u§@ªí)

°õ¦æ«á¡AV3©¹¤Uªº¤u§@ªí¦WºÙ·|§ó·s (¦WºÙ¤¤¦³"#"¤~·|³Q¦C¤J)
  1. Sub §ó·s¤u§@ªí¦WºÙ()
  2. Dim ShAll
  3. For Each sh In Sheets
  4.   If InStr(sh.Name, "#") Then
  5.     ShAll = ShAll & "," & sh.Name
  6.   End If
  7. Next
  8. ShAll = Split(Mid(ShAll, 2), ",")
  9. [V3].Resize(UBound(ShAll) + 1) = Application.Transpose(ShAll)
  10. End Sub
½Æ»s¥N½X
¦pªG§A·Q­n·s¼W¤u§@ªíªº®É­Ô´N "¦Û°Ê°õ¦æ"

¥i¥H¦b¬¡­¶Ã¯¨Æ¥ó¤¤¡A©I¥s¤W­±ªº µ{§Ç
  1. Private Sub Workbook_NewSheet(ByVal Sh As Object)
  2.   §ó·s¤u§@ªí¦WºÙ
  3. End Sub
½Æ»s¥N½X
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2020-5-28 14:12 ½s¿è

¦^´_ 5# yc1031


ÁÂÁ§A¼·ªÅÀ°§Ú¦^µª°ÝÃD

²Ä¤T¨Bªº¨ú­È, ¬O¦]¬°§Ú¤£·|¥Îvba, ©Ò¥H§Ú¤~·Q¥Îindirect¥h±a¸ê®Æ«á, ¿ývba¨ú­È¶K¨ì"¸ê®Æ¶K¤J°Ï", ¤§«á¦A¿ývba¿z¿ï±Æ§Ç, §Ë¨ìÁ`ªí¥h
¦pªG¥i¥Hªº¸Ü, ¤]¬Oª½±µ¥Îvba °µ²Ä¤T¨B, ¤£¾å±o¬O§_¥i¥H±Ð§Ú«ç»ò°µ?
* §Ú¤é«á·|¦A·s¼W±b¤á

¥Î¨ç¼Æ¦A¥ÎVBAªº End¤èªk ·|¦³°ÝÃDªº End(xlUP) = «ö¦íCtrl + Áä½L¤è¦V½b ¦V¤W

§A¥i¥H°µ­Ó¤p¹êÅç¡A¶}¤@­Ó·s¤u§@ªí

¦b[B2]Àx¦s®æ ¶ñ¤J¤½¦¡ B2 =""  (ªÅ¸ê®Æ)

¤â°Ê½Æ»sB2Àx¦s®æ¡A¿ï¾Ü A8Àx¦s®æ ·Æ¹«¥kÁä > ¿ï¾Ü©Ê¶K¤W > ­È

µM«á¿ï¾Ü A15 Àx¦s®æ (A8¥H«á³£¦æ) «ö¦íCtrl + Áä½L¤è¦V½b ¦V¤W  Àx¦s®æ·|°±¯d¦bA8 ¤£¬O A1

ÁöµMA8 ¬Ý°_¨Ó¨S¦³¤H¥ô¦óªF¦è!  ³o¬OExcel ¤@ª½¦³ªº°ÝÃD ¡AUsedRange¤]¦³¦P¼Ë°ÝÃD

·Ç³Æ¤W¯Z¥h¤F¡A§A­nªº²Ä3¨B¤£Ãø¡A

¬Ý³o¸Ì¦³¨S¦³¤HÀ°§A¼g¡A¨S¦³ªº¸Ü§Ú¤W¯Z¦^¨Ó¦AÀ°§A

µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD