Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default What UDF's are being used?

Hi,

Is it possible to find all formula's in a workbook that are referencing
a User Defined Function? I have a spreadsheet with a couple of hundred
formulas, that reference a number of different UDF's, and I would like
to be able to find out what is referencing what ...

Any ideas?

Cheers

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default What UDF's are being used?

you could use the FIND method --- help is useful

Option Explicit
Sub FindTest()
Dim ws As Worksheet
Dim what As String
Dim firstAddress As String
Dim found
what = "MyFunction"
For Each ws In Worksheets
With ws
Set found = .UsedRange.Find(what, LookIn:=xlFormula)
If Not found Is Nothing Then
firstAddress = c.Address
Do
' do something with it
Set found = .FindNext(found)
Loop While found.Address < firstAddress
End If
End With
Next

End Sub

the do something with bit I leave up to you. I'd add the cell reference,
with the sheet name to a ciollection,. After the FOR/NEXT loop finishes, add
a new sheet for the results, looping through the collection & putting the
data onto the sheet





"SkylineGTR" wrote:

Hi,

Is it possible to find all formula's in a workbook that are referencing
a User Defined Function? I have a spreadsheet with a couple of hundred
formulas, that reference a number of different UDF's, and I would like
to be able to find out what is referencing what ...

Any ideas?

Cheers


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default What UDF's are being used?

Hi Patrick,

Thank you for your response. I sort of figured you could do that, but
what I really wanted (if it is possible) was to know if there was a way
to use some inbuilt Excel function to tell whether a formula contains a
UDF/or multiple UDF's, and if so which. Using the above method means
that if I add a new UDF, I have to specify the new function name. What
I want is a function that
effectively does:

ListAllUDFs

and gives me a list of formulas, and what UDF's they contain. Maybe
this is not possible, but I had the faintest hope that Excel would know
what its functions are, but also what UDFs are present in the formula -
maybe I am hoping too much.

Thank you once again.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default What UDF's are being used?

How should you define the variable c.
Pls give me the code & where to place it
Thxs

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF's shane Excel Discussion (Misc queries) 4 March 24th 10 03:37 PM
UDF's in Excel '07 Jack Setting up and Configuration of Excel 0 November 12th 07 09:27 PM
UDF's using other UDF's millsy Excel Worksheet Functions 9 December 18th 05 08:38 PM
Argument help for UDF's Jan Kronsell Excel Programming 2 November 6th 05 12:19 PM
UDF's jim c. Excel Programming 2 November 18th 04 08:33 AM


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"