XPos1 = InStr(xPos2, sFormula, sName) - 1 Private Function IsPresent(sFormula As String, sName As String) As Boolean MsgBox "The Named Range has been found these locations: " & xFoundAt,, "Kutools for Excel" MsgBox "The Named Range was not found",, "Kutools for Excel" XFoundAt = xFoundAt & ", " & xCell.Address If IsPresent(xCell.Formula, xSearchName) Then LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ Set xCell = xRg.Find(What:=xSearchName, LookIn:=xlFormulas, _ XSearchName = Application.InputBox("Please type the name of named range:", "Kutools for Excel") ![]() Set xSht = Application.Worksheets(xShName) XShName = Application.InputBox("Please type a sheet name you will find cells in:", "Kutools for Excel", ) VBA: Find where a certain named range is used Sub Find_namedrange_place() Click the Insert > Module, and copy and paste following code into the opening Module window. ![]() Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.ΔΆ. This method will introduce a VBA macro to find out all cells which use the certain named range in Excel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |