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

°ÊºA¸ê®Æ½d³ò ¦WºÙ©w¸q

°ÊºA¸ê®Æ½d³ò ¦WºÙ©w¸q

¤j®a¦n
·Q½Ð°Ý¤j®a
§Ú¦³¤@­Óexcel ¤º¦³¦h­Ósheet
¦U­Ósheet ¤¤ªº¦³¸ê®Æ½d³ò¤£©T©w
·Q½Ð°Ý­n¦p¦ó§Q¥Îvba §Ö³t¦a±N¦U­Ósheet¤¤¦³¸ê®Æªº½d³ò¶i¦æ¦WºÙ©w¸q

ÁÂÁÂ

¥H¤U¬°§Ú¥Ø«eªº¸Ñ¨M¤èªk

Dim i As Integer
  
  For i = 1 To ¢ö 'n=sheetªºÁ`¼Æ
    Sheets("²Ä" & i & "¶µ").Select
   Sheets("²Ä" & i & "¶µ").UsedRange.Select
   
    ActiveWorkbook.Names.Add name:="²Ä" & i & "¶µ", RefersTo:=Selection
  
  Next

TOP

¦^´_ 1# ciboybj
  1. Sub ex()

  2.     shs = Array("sheet1", "sheet2")

  3.     For Each sh In shs

  4.         Sheets(sh).Select 'Activate

  5.         EndRow = Cells(Cells.Rows.Count, 1).End(xlUp).Row
  6.         Set Rng = Range("A2:A" & EndRow)
  7.         
  8.         '¤èªk1 ÀRºA½d³ò¦WºÙ¡AAÄæ¸ê®Æ¥HA1¬°¦WºÙ
  9.         Names.Add Name:=[A1], RefersTo:=Rng
  10.         
  11.         '¤èªk2 °ÊºA½d³ò¦WºÙ¡ABÄæ¸ê®Æ¥HB1¬°¦WºÙ
  12.         Names.Add Name:=[B1], RefersTo:="=Offset($B$1,,,COUNTA($B:$B)-1)"

  13.     Next
  14. End Sub
½Æ»s¥N½X
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

ÁÂÁÂ~
¤£¹L§Ú¦³­Ó°ÝÃD·Q¦A¦V±z½Ð±Ð
¥Ñ©ó§ÚªºSHEET¨Ã«D§Ú¦Û¦æ«Ø¸mªº
©Ò¥H¦³¥X²{Ãþ¦üSHEET1(¦WºÙ¬°²Ä¤@¶µ)¡ASHEET3(¦WºÙ¬°²Ä¤G¶µ)
¦]¦¹¡A¦p¬O¨Ï¥Î±zªºCODE¤£ª¾­n«ç»ò§ï

TOP

¦^´_ 4# ciboybj
  1. Sub ex()
  2. Dim Sh As Worksheet
  3. For Each Sh In Sheets '©Ò¦³¤u§@ªí°j°é
  4.    With Sh
  5.       ActiveWorkbook.Names.Add .Name, .UsedRange '¥H¤u§@ªí¦WºÙ¬°¦W¡A©Ò¦³¸ê®Æ¬°½d³ò¡A·s¼W©w¸q¦WºÙ
  6.    End With
  7. Next
  8. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¤j®a
Åý§Ú¾Ç²ß¤F~~~

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD