user defined function

  1. J

    Does anyone know of a UDF that performs a "Subtotal" median function?

    Hi all, there are many threads that reference this formula or something similar with the goal of emulating the Subtotal behaviour for Median. In my case, specifically I'm wanting the median function to only apply to visible cells when I'm using filters. The formula that I've been using and seems...
  2. J

    UDF Date function

    I've created a function that will provide me with the end date of the previous month: [[Date]-Day(Date)] which would return 1/31/2016 in this case. The problem I'm having is that when I enter that function to calculate against other date fields it comes up as a text and I get #error in the...
  3. Hobolord

    User defined function not returning desired values

    Hello, I have a PC, Windows 7, and Excel 2013. This is my first time working with a UDF, and I'm sure I've done something wrong... but I have no clue what. The function is supposed to take 3 cells, Year, Job Type, and Margin, and based on the three criteria, the output should be the proper IC...
  4. D

    User Defined Function Call Error

    So this is related to an earlier post I submitted. Someone was very kind enough to give me a function that did exactly what I wanted. However the only way that I can call this function is by creating it as an add-in. I would much rather use this in a macro enabled workbook because then other...
  5. T

    How to identify the row from which a UDF is being executed?

    Hello, I need to identify the row number from which my UDF is being executed . I want reference cells("the row" , 1), but don't know how to reference the row number. Obviously, ActiveCell.Row is not appropriate but was used as an example. Thanks for your help. Ted H. Function...
  6. S

    VBA Loop and UDF

    Good morning/afternoon! I am trying to create a button that will run a calculation for me based on a custom function. It keeps returning 0, which is my Case Else statement. I debugged to make sure my data is in the appropriate columns. Hiredate is column J and Potential is column T. Here is...
  7. R

    Optimize UDF - Cell Color Counter - VBA

    I have a workbook with a main control sheet and 40-50 different data sheets that are copy/paste valued into the file from an external source (each sheet has anywhere from 30 to 500 rows and 10 to 100 columns with data). The purpose of the workbook is to compare cells in various data sheet...
  8. A

    Sumifs with UDF for Sum by Text Color

    Hello, This site has been incredibly helpful for me in the past by searching for similar requests by other posters but I could not find an answer to this problem I am facing... I have been using a UDF I found online to do a sumif based on the text color of the sum range. See below: Public...
  9. L

    Regular Expression (RegEx) User-Defined Function (UDF) to Extract Filenames from Network Path Strings

    Hi there. I've got a weekly work task involving the extraction of filenames from 10,000+ unwieldy and inconsistently-formatted network filepaths. Adding complication is the fact that these are multivalue: the same cells contain multiple filepaths\filenames separated by semicolons. I need to...
  10. P

    How to return the merged range that a cell belongs to

    Hi, This may be easy but I cant think of a UDF that would return a range representing the merged range a cell belongs to. So if we have "A1:A10" merged, the function would return that range for Range("A3"). Thanks.
  11. L

    UDF for converting letter ratings to number and multiplying by percentages for performance ratings

    I would like to write a User Defined Function to calculate performance ratings. Our employees are rated on a scale of I, M-, M, M+, E, where I would be the lowest level and E would be the highest. You can assign a number to each of these ratings from 1 to 5. Employees are then graded on each...
  12. bs0d

    VBA Custom Function - Form Control Name Object not Supported?

    I'm creating a custom function to cut down on redundant code. However, in converting the code to a function so that it may be used in different instances, I'm getting an unexpected error when the code executes. The error is: Object doesn't support this property or method. Here is my...
  13. S

    {Non-array} formula way to calculate Total Returns

    Particularly "since inception" Total Returns where (1+ x.x%) each individual quarters return, for compounding, would be too onerous. I've seen User Defined functions on other message boards but they don't give me the same returns and don't seem very "robust", or I botched them despite the amount...
  14. F

    Possible to use user defined functions within array formula?

    I created the following user defined function: Function FontColor(r As Range) As Integer FontColor = r.Font.ColorIndex End Function Now I need to count only the rows that have "cat" in column A as well as red font in column B: <tbody> A B dog 8 cat 9 shoe 6 cat 9 shoe 42 dog 8...
  15. B

    VBA Problem.... One for someone far smarter than i am.!!!

    Hi all, I am trying to use this user defined function called RANGEMATCH that i had a look at being used elsewhere being the following code Function RANGEMATCH(SearchIn As Range, SearchFor As Range) ' ' For Each Cell In SearchFor If InStr(SearchIn, Cell) Then RANGEMATCH = Cell.Value Else...
  16. R

    Conditional Formatting/VBA/User Defined Function for Cell Color

    I have a spreadsheet that has conditional formatting where I track insurance expiration dates. If the cell is blank it is yellow If the date in the cell is current it is blank If the date in the cell expires within 30 days it is orange If the date in the cell is expired now it is red Now...
  17. G

    No portability with UDFs

    Hi all, Long time reader, first time poster. I have created a macro workbook that sits on our server that various users on different computers need to be able to open. I have solid (if self-taught) experience with VBA code, UDFs, etc.,, but very little experience with creating, setting up or...
  18. A

    User Defined Functions returns #VALUE after a macro is run

    Hi everyone, I am using the following User Defined Function to count the number of indents in a cell. Public Function IndentCount(rCell As Range) As Long IndentCount = rCell.IndentLevel End Function However, I am having a problem with the function returning #VALUE after I run the macro...
  19. C

    Reference Object Library within user defined function

    Hello I have written a UDF (Usder defined function), which accesses a access database and runs an SQL call in it and returns the data item. I'd like to automatically reference the "Microsoft ActiveX Data Objects Library" I use for this UDF and I have written a sub that does this Sub...
  20. N

    Chaning Cell Colors within a Function No Conditional Format

    Hello, I am trying to make a scheduling spreadsheet that can give visuals and allow for a lot of variable change. I am needing some input on how to change the color of a cell. I don't want to use conditional formatting, because every time I add a new project, I will have to add the formatting...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top