- 帖子
- 4901
- 主題
- 44
- 精華
- 24
- 積分
- 4916
- 點名
- 120
- 作業系統
- Windows 7
- 軟體版本
- Office 20xx
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台北
- 註冊時間
- 2010-4-30
- 最後登錄
- 2025-5-18
               
|
回復 3# Genie
自定義函數- Function LocationName(Fn As Range, Rng As Range, item_name As Integer) As String
- Dim A As Range
- For Each sh In Sheets
- With sh
- If sh.Name <> ActiveSheet.Name Then
- Set A = .Range(Rng.Address(, , xlA1)).Find(Fn)
- If Not A Is Nothing Then
- Select Case item_name 'item_name=0傳回工作表名稱,item_name=1傳回儲存格位址
- Case 0
- LocationName = .Name
- Case 1
- LocationName = A.AddressLocal
- End Select
- Set A = Nothing
- Exit For
- End If
- End If
- End With
- Next
- End Function
複製代碼
SheetName.zip (10.27 KB)
|
|