View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default How do I install a UDF?

Installing a User-Defined Function (UDF) means pasting the code into a
general VBA module. Then you can use the UDF like any other function in
regular Excel. This
link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Jon explains step-by-step how to get into the Visual Basic Editor, add a VBA
module, add the code, etc.

Hope this helps,

Hutch

"GeorgeA" wrote:

Hello,
I found this great post from Stefi but I don't know what it means to install
a UDF and can't find any reference in the Excel 2007 HELP files. Can someone
help me.

Install this UDF (post if you need assistance in installing), enter
=ColoredRow(ROW(),3) in all rows in an unused column! Autofilter the TRUE
values in this column, and copy them into a separate sheet!

Function ColoredRow(rownum, colorcode)
ColoredRow = False
For Each cella In Range(rownum & ":" & rownum)
If cella.Font.ColorIndex = colorcode Then
ColoredRow = True
Exit Function
End If
Next cella
End Function

Regards,
Stefi