ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Search Cell Address and Cell Names in VBA Editor (https://www.excelbanter.com/excel-programming/322924-search-cell-address-cell-names-vba-editor.html)

ExcelMonkey[_190_]

Search Cell Address and Cell Names in VBA Editor
 
Does anyone know how to do a search on a cell name or cell
address to see if it has been referenced in the VBA
modules of a spreadsheet? Lets say I have a cell A10
(named "StarCell"). Lets also assume the cell is within a
range called "Revenue". I want to be able to search the
code in my VBA Editor to see if A10("StartCell") is used.
I am assuming that I would look for the following
occurences in all the modules in the spreadsheet:

1) Range("StartCell")
2) Range("Revenue").Cells(X,Y) which is the same as the
address of "StartCell"
3) Check all Offset methods to see if any of the cell
addresses in each offset are equal to the address
of "StartCell"


Does anyone know how to do this?



Tom Ogilvy

Search Cell Address and Cell Names in VBA Editor
 
I don't have any specific code for you, but you can look at

http://www.cpearson.com/excel/vbe.htm

to get the start on an approach to do it.

--
Regards,
Tom Ogilvy

"ExcelMonkey" wrote in message
...
Does anyone know how to do a search on a cell name or cell
address to see if it has been referenced in the VBA
modules of a spreadsheet? Lets say I have a cell A10
(named "StarCell"). Lets also assume the cell is within a
range called "Revenue". I want to be able to search the
code in my VBA Editor to see if A10("StartCell") is used.
I am assuming that I would look for the following
occurences in all the modules in the spreadsheet:

1) Range("StartCell")
2) Range("Revenue").Cells(X,Y) which is the same as the
address of "StartCell"
3) Check all Offset methods to see if any of the cell
addresses in each offset are equal to the address
of "StartCell"


Does anyone know how to do this?






All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com