user defined function

  1. FilleFrella44

    User Defined Function (UDF)

    Hello everyone! I've recently gotten to understand that you're able to create your own functions by taking an Excel-workbook, adding some VBA "Functions" to it in modules, and then save and load it as an Add-in into Excel. Now this is so amazing, a real game-changer. But, what I want to know...
  2. 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...
  3. 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...
  4. S

    User Defined Function randomly throws out #Value error.

    I am trying to write a UDF to add a note to the cell it is in. Here's the code I have: Function comcopy(cll2 As Range, cll As Range) As Integer Dim c As Integer Dim r As Integer c = cll.Column r = cll.Row + 1 comcopy = 0 Sheet7.Cells(r...
  5. 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...
  6. 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...
  7. T

    UDF that takes a value, finds it within an array and then multiplies it by the last column

    So I am working on what seemed to be a simple project. I have the following matrix: $0 $40,000,000 0.200% $40,000,001 $80,000,000 0.175% $80,000,001+ 0.125% If I have a value of $50,000,000 then the function must perform the...
  8. V

    Call User Defined Function to work with ActiveCell.Column

    Good Morning Task: Color set of cells, and then sum cells in active column, based on background of cell, then output to specific location. I found a set of functions that allow me to Count and Sum Cells, based on Color. I have set up the functions and confirmed they work separately...
  9. B

    User Defined Function for stock variance

    Hello, I need help in creating a custom function that will calculate variance of a stock using its raw prices. This means that the returns calculation will take place within the function. I have written the code, but its not giving the right answer, could anyone please guide me? Thanks in...
  10. S

    Question for excel pro's.How to create user defined function that would sound an alarm once conditions are met.

    I have an excel spreadsheet with a streaming temperatures data in a multiple cells. I'm trying to create a user defined function that would sound an alarm when a temperature rises above specified value.This value is a parameter of this function. So far I have this code... Function...
  11. A

    Looking to Adapt This or New One to Parse Cell by Character

    My data looks like this: <tbody> c2=\Data Tab\Get & Transform c3=\View Tab\Show/Hide\Ruler I am looking for a function - for this example named Parse where Parse(c2,"",1) equals Data Tab Parse(c3,"",2) equals Show/Hide </tbody> Public Function separate(field As String, separator As...
  12. C

    User Defined Formula (UDF) Problem - Results is either 0 or #value error

    Hi, I'm new to VBA so please bear with me. I'm trying to create a UDF function that will calculation turbulent friction faction using churchill equation The arguments include reynolds number, absolute roughness (mm), internal diameter (mm). I've followed several tutorials in formulating the...
  13. J

    How do I format a user defined function output as short date?

    I have worksheet function I made, Days90(). Its purpose is to output the date that is 90 days from the current day, not including weekends. Everything with it works except it is output as a serial instead of as a date. For example, if I use the function today it will output 43311 instead of...
  14. V

    Combining Selected Worksheets into One

    I am spending way too much time combining worksheets onto a summary sheet. Is there vba code that could do this for me? I must combine worksheets together that have "REQ" somewhere in the tab name within the active workbook which could be one tab or several. My only worry here is the author of...
  15. A

    User Defined Function - look for specific value above current cell

    I have the following Data Set: <tbody> 1 Brand ABC 2 MFG Apple 3 Overivew1 4 Overview2 5 Brand DEF 6 MFG Peach 7 Overview1 8 Overview2 9 Brand XYZ 10 MFG Grape 11 Overview1 12 Overview2 </tbody> I need a user defined function that will look up the brand and place it...
  16. S

    A very simple user defined function in vba with two arguments results in "there's a problem with this formula"

    I have the following code in a module in my excel macro enable excel file: Public Function Test1(x) Test1 = x End Function Public Function Test2(x, y) Test2 = x - y End Function When I call the first function from excel =Test1(10) I get 10 in the cell When I call the second...
  17. L

    Returning Multiple Values Through A Vlookup - Formula or VBA

    Context: I regularly use Vlookups in my work as part of a project, but as you may be aware, they can only return one value from the lookup column. For month-end reporting I need to determine if a particular account as a record in the relevant system inboxes, if it appears in more than one...
  18. J

    How to get UDF to calculate on WB open?

    Hey all, I have this UDF to emulate the Subtotal function for calculating the median on visible cells only within a range, but it seems to rarely (if ever) calculate when I open the workbook... I have to enter or tab through each cell containing the function in order to get a value rather than...
  19. B

    Need help creating User-Defined Functions in Excel to query from a database

    I work in an HR department that does not have any user defined functions(custom functions). For example: I would like to be able to use an Employee# to pull their First Name from our database. Example Function: =GetFirstName(Employee#) I need help writing the VBA coding necessary to facilitate...
  20. B

    UDF VBA - Multiple Replacements of Substrings in a String to ""

    New to the forum. I'm stuck on this replacement loop. Function CCL2(ByRef txt As String, ByRef x As String) ' txt as starting text ' x as cell containing array that can be split by " " (space character) ' y as a String Array Dim y() As String ' split x into array by " " y =...

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