User-defined functions (UDFs) are VBA procedures that typically take inputs (although inputs are not mandatory) to return a result to either a worksheet cell, or to another VBA procedure. By design UDF's that are called from a worksheet should only return a value to the cell from where the function was called - the UDF should not modify the contents or formatting of any cell, or the operating environment of Excel (there are workarounds to this design).
Questions tagged [excel-udf]
99 questions
-1
votes
2 answers
Convert the Sub below into a built-in Function
I am VERY new to VBA.
I am trying to build a UDF function to parse comma delimited text in a cell into rows. I have a Sub that works fine, but requires a manual "run"; I want it to be a function.
Say I have in cell A1 the following string comma…
-1
votes
1 answer
Excel Formula to type in numeric value of green cells in the same row
I would like some help in entering a formula in excel VBA I assume to enter all numbers of a certain highlighted color (green in this case) in a different column but is in the same row within a column range.
Excel Table 1
To help make things…

Yousef Alkaff
- 3
- 2
-1
votes
2 answers
Creating UDF using VBA in excel to find similar values in a row where order does not matter
I am dealing with unlimited new rows of data every day and I need a UDF that would find similar row values regardless of its order. As you can see in the example bellow A9:F9 and A4:F4 has a similar row values marked as SIMILAR ROW 1. You need to…

Egie Boy Aguspina
- 29
- 7
-1
votes
1 answer
Find average of top and bottom n percent of range with extra condition
Example:
Part, Qty
Book, 1
Book, 2
Book, 3
Book, 4
Book, 5
Book, 6
Book, 7
Book, 8
Book, 9
Book, 10
Pen, 4
Pen, 7
I'm trying to calculate the book qty average of top 10% in the range B:B.
Tried getting it to work with an…

Ruben
- 3
- 4
-1
votes
1 answer
VBA Excel: User Defined Function
FIXED: check user3964075's comment
Need help with my simple code below:
it's basically a different version of vlookup where you can also specify which row to look for.
asda(fval, rng, fcol, rcol)
fval is what the user is looking for
rng is the…

hakusai
- 3
- 2
-2
votes
1 answer
Limits reached in INDEX(MATCH()) when taking array as argument to look in
I use this formula:
=IFERROR(IF(MATCH(transf(E7);transf(Sheet2!$C$2:$C$66648);0)>0;"YES");"no")
transf is a UDF which simply converts/transforms the actual text value in cell to lowercase and does some other stuff (not the subject for this…

ZygD
- 22,092
- 39
- 79
- 102
-2
votes
3 answers
Way too long of a function but I need it - can it be done in VBA?
Because of severe lack of knowledge, I made a ridiculously long function so that I could make my calculation. The problem is that it is too long for Excel, and I tried looking online to see how I could maybe make a new function in VBA that…

Erik
- 13
- 1
- 4
-3
votes
3 answers
Returning values if it is greater than and less than to a specific value using UDF
I am currently working on a UDF which returns and concatenates the headers if it is greater than and less than to a specific value. I’m not really good in Excel-Vba and what I got so far is this pathetic code which I couldn’t understand anymore. I…

Rakushoe
- 118
- 11
-3
votes
1 answer
Macros causing Lag
I am running a program that uses 5 macros and lots of formulas. Some of the macros I have asked for your help on here. After putting the program together there is alot of lag. I mean if we delete a line we have to wait 1 to 2 minutes for it do…

user3554998
- 19
- 9