1. littlepete

    UDF om aantal jaren, maanden en dagen van een periode tussen twee datums in vloeiend nederlands

    Dit is geen vraag, maar een oplossing voor wie er naar zoekt: een UDF die verbeterd de functie datumverschil uitvoert: wie de periode tussen twee datums wil omschrijven met jaren, maanden en dagen, zonder dat er 0 jaar of 0 maanden of 0 dagen tussen zit, kan deze formule gebruiken ... Perfect...
  2. M

    UDF to retrieve formula in target cell

    Hi, I need to create a custom VBA function to perform an operation similar to VLOOKUP. I want to perform a search operation like VLOOKUP. But the only difference is, I need to retrieve the formula in the target cell instead of retrieving value in the cell, and I don't want to print the...
  3. drpdrpdrp

    VBA for Dates Computation is too Slow

    The following VBA UDF returns a 4-value-array using a Date value as input. Even though it is simple, if I ran for ~10'000 rows calculation time is not satisfactory (>30seconds). What am I doing wrong and how should I write the code to make it faster? ' YrMoDoy Function YrMoDoyDom(InputDate)...
  4. J

    UDF evaluates after every change

    Hi, I have an issue, i though pretty simple one but cant handle it so i guess was wrong. I have a UDF that calculates average of exchange rates between 2 dates Option Explicit Public Function averageFromRange() As Double Dim sh As Worksheet Set sh = ThisWorkbook.Worksheets("Exchange...
  5. M

    Custom Fuzzy Lookup (in rows)

    Hi all, I have inherited some fuzzy match code (below) which compares two text strings, it works fine and gives me the character similarity I need, but it also gives me 5 columns of other data (which I don't want or need). Example below. Would anyone know which bit of the below to edit out so...
  6. C

    User-defined function that returns an array doesn't work in a named table

    I made a user-defined function in vba that returns an array. It works fine in normal spreadsheets but failed when it is applied to a named table with error "#SPILL!" appears in the first cell. I'm sure there is no other content in the spill range. If I turn the normal spreadsheet range that the...
  7. drpdrpdrp

    Loop through Range/Array - Vectorized Calculations (VBA UDF)

    I understand that I can take a range of values and make a vectorized calculation on it by using {...} in plain excel (Method 2) (Method 1) below is showing the simplest way of accomplishing what I need: 1. Take the values in a range/vector/array, 2. subtract a fixed value from each 3. save as...
  8. A

    Combining UDF with IF function

    I need to combine a UDF (below) with a set of IF functions. Function MaxN(n&, r As Range) Dim i&, j&, m#, t#, v v = r.Cells.Value2 For i = 1 To UBound(v) If UBound(v) - i + 1 >= n Then t = 0 For j = i To i + n - 1 t = t + v(j, 1)...
  9. T

    Merge duplicate and similar rows into new sheet

    The initial part of my query is similar to some other posts (although I am not adept enough at VBA to modify the code as needed to suit my purposes), but because the second part goes beyond what I've been able to find already on the forum, I thought I'd post the whole question here. I'm working...
  10. T

    UDF to reformat hierarchical numbering for sorting

    The fact that Excel is unable to identify and correctly sort hierarchical numbering (ex. 1.1, 1.2, 1.2.1, 1.2.2, 1.3...) is an age-old problem which has been widely discussed in many fora. There are numerous workarounds, but they are often project-specific or formula-based. At the moment, I have...
  11. C

    Count occurrences of values in named range

    I have a list of values in a named range and I want to count each of their occurrences in another range with text added to the end of it. For example, the named range contains the value "L, E, & N". I want to find the amount of times those values appear in another range with "-FAL" or "-SAL"...
  12. P

    Show Table Filter Criteria In Cell

    Working on UDF to display the filter criteria for a table. UDF would be just above filtered table. Found perfect UDF but only works on normal filters, not table filters. Having trouble adapting it: Function Show_Criteria(Rng As Range) As String Dim str1 As String, str2 As String Dim tbl As...
  13. S

    Function returns #VALUE but works in immediate window

    I am trying to make a function where, based on an article code, the funciton looks in a different sheet with matching codes and takes the right discount (5 columns to the right of the cell with the code). Then I would like to return a specific value when the discount is set as "standaard"...
  14. X

    extend a UDF to work in different workbooks

    Okay. So i have copy and pasted a UDF that lets me find the value from the selected cell in a table located in another worksheet. Now what i need is for it to work in a different workbook too. here is the UDF: Function FindValueInTable(MyWorksheetName As String, MyValue As Variant, Optional...
  15. D

    Need UDF for executing a concatenate in a matrix of text

    First, thank you for your time here! I'm hoping to find a UDF or other macro that will allow me to perform a concatenate on a matrix of text built out in excel. The aim is to create an output column that contains every possible combination of the text that has been input into the various...
  16. MikeMcCollister

    UDF Dependent Ranges

    I have some user defined functions (UDFs) that I want to add some range dependencies to. This is so that I don’t have to make them volatile any more and will make calculations faster. The current UDFs have either one or two arguments as shown here: =BudgetLineItemTotal(B24)...
  17. MikeMcCollister

    UDF Application.Volatile and Other Workbooks

    I have some user defined functions (UDF) that I have added Application.Volatile to. They work fine and if I make changes to a sheet in my workbook the functions get called. However, I just found out that if I have a second workbook open and make changes to that then the workbook with...
  18. B

    Workbook.Open silently fails to function, execution continues - Totally baffled

    I am working on an Excel workbook (CollectorWorkbook) that is to open a series of about 5000 workbooks (DataWorkbooks) and collect data from specific cells in those DataWorkbooks. To do this, I want to use a UDF in about 30 cells of the CollectorWorkbook. I have used a similar approach to...
  19. R

    VBA - how to stop Excel from recalculating UDF's multiple times when used in namedrange/chart

    Hi, I have a serious problem, which I cannot solve for quite a while. I have three UDF's: Private Function IsInArray(stringToBeFound As Variant, arr As Variant) As Boolean IsInArray = Not IsError(Application.Match(stringToBeFound, arr, 0)) End Function This function checks...
  20. M

    Last Modified UDF Row Function

    I do not know if this is possible however, what I am looking for is to modify this UDF function to show the date that a cell was last modified. Currently, it is only showing the date that the UDF is inserted, not the actual date that the cell was modified. For Example: -If I am insert the...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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