udf

  1. 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...
  2. 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"...
  3. 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...
  4. 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...
  5. 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)...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. K

    Returning Jagged Arrays

    I've got a VBA UDF which extracts (multiple) numbers from a string, cell, range, or array. It's used in a variety of scenarios so it needs that flexibility, and generally worked EXCEPT...when the range has different result sizes in different cells The function returns a single number, array of...
  11. C

    Trim, Clean using Evaluate running into 256 character limit

    Hello I have large datasets that I run automated processes on that I need to trim and clean and have been using: Function CleanSheets(arrShtNames As Variant, startRow As Long) Dim ws As Worksheet Dim rng As Range Dim LR As Long, Lc As Long For Each ws In Worksheets(arrShtNames) With ws...
  12. J

    Reference Libraries Disappear at Startup

    I have to enable the following reference library to execute SQL commands in VBA. While I have added my UDF into my startup workbook, the reference library becomes unchecked every time I open and close Excel? How do I get it to stay added whenever I open my startup workbook? Libary: Microsoft...
  13. Saher Naji

    Could we make an excel formula shorter with use UDF function?

    I have this formula in excel, which is very long: and this is the BVA code, which is generated once I record a macro: Sub tESTpRICE() ' ' tESTpRICE Macro ' ' Range("AB2").Select ActiveCell.FormulaR1C1 = _ "=IF(RC[-26]=1,RC[-1],IF(RC[-26]=2,RC[-1]+R[1]C[-1],IF(RC[-26]=3...
  14. VBE313

    How Do you Put Optional Parameters in UDF the Correct Way?

    In the following code, I can not seem to calculate my UDF correctly, am I putting the optional things incorrectly? Function weldMinutes(numOfPIA, simpleOrComplex, antiSplatterYorN, fixtureYorN, numOfTack, weldType1, GMAWorGTAW1, weldLength1, numOfWeldStarts1, Optional weldType2 As Long...
  15. Dave_O

    VBA: Excel Uppercase words between HTML <strong>

    Hello, I am saving a website's source code as a text file, then importing it into a worksheet. I currently use a UDF to vbCrLf existing Uppercase word's, but I would like to make all words Uppercase between <strong> .....<\/strong> I am OK with either VBA or UDF. SAMPLE: As is...
  16. R

    Replicate SUMPRODUCT in VBA to create UDF which is much shorter to simplify appearance of formulae

    Hello, I would like to know how to create a UDF in VBA that replicates a SUMPRODUCT formula. Is this possible and how can I do it? I am new to VBA so not familiar enough with the code to create this myself. For example - UDF - HO() = SUMPRODUCT((Item Index range=X)*(Date Index...
  17. J

    Creating a UDF to execute a formula

    I am trying to create a UDF that executes the following formula but I am unsure how exactly to structure the code for UDFs, more up to speed on run-of-the-way VBA macros. Any guidance would be appreciated...
  18. JenniferMurphy

    Best way to skip 1st & last cell in range in UDF?

    I have a little UDF that does some tallies on a column of cells (B2:B5). <tbody> R/C A B 1 Group Rating 2 North 25.2 3 South 14.7 4 East 52.0 5 West 33.8 6 Average 31.4 </tbody> I call the UDF from another cell like this: =Tally(B2:B5) I want to change that to include the cell...
  19. VBE313

    UDF involving Split function or Formula Text?

    I created a UDF that calculates how many minutes it takes to complete a certain task. (ex: =MinutesToComplete(1,0.18,10,50,20) ) Is there a way to extract each argument/parameter? (ex: =RightParameter() ) and the answer would be 20
  20. VBE313

    Udf vlookup

    I have a table of items that are assigned a fixed cost. Example: Item) Name) Price 1) Red Ruby Shirt) $35.22 2) Blue Tuxedo) $47.90 On a separate sheet I have a UserForm with a list box that grabs the table from the other sheet. I would like...

Watch MrExcel Video

This Week's Hot Topics

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
Top