custom function

  1. C

    User-defined function Excel 2010

    I am trying to create a custom function that will be used on multiple different sheets. Depending on the data on each sheet, the custom function needs to calculate a few different ways. One of the inputs needed for the function to know what to do is "NumNewDiags". I currently have another...
  2. T

    Heavy custom function

    Hello everyone! Suppose I have the following range: <tbody> Project Name Color Project A yellow Project A green Project A red Project A green Project A green Project B blue Project B yellow Project B yellow Project B blue </tbody> I would like to code a custom function...
  3. S

    Create a VBA custom function for a long function

    I have the following functions: 1. =MID(H2, FIND(":", H2) + 1, FIND(",", H2) - FIND(":", H2) - 1) and 2. =MID(H2, FIND(":", H2, FIND(":", H2) + 1) + 1, (LEN(H2) - 1) - FIND(":", H2, FIND(":", H2) + 1)) The only variable is H2. NOTHING else should change. How can I create a VBA function to...
  4. P

    UDF/Custom Function Working 1st Time, but Recalculating 2nd Time and Returning #VALUE... ??

    Hello VBA and UDF world, I have a UDF/Custom Function that works the 1st Time it's ran, but when I try to use the data in a pivot table the function attempts to recalculate and returns #VALUE. I have researched this issue, came to some conclusions, but can't figure it out entirely... I found...
  5. Gingertrees

    custom function to search for multiple instr?

    I'm trying to write a function to test if a cell contains a website. So far I've got: Function IsURL(text) Dim test As Variant Dim eml As Variant eml = InStr(text, "@") 'if not present, position = 0 test = InStr(text, ".com") If eml > 1 Then IsURL = "email" ElseIf test > 4 Then IsURL =...
  6. A

    Skewed Random Number Generator

    I am trying to generate 15000 random numbers that have similar charities to the same number of historical data points. The data is approximately from the t distribution, with the only exception being that it has skewness of -.21. Does anybody have any vba code that will accomplish these...
  7. C

    Custom formula to count rows in columns a find the difference

    My goal is to insert a dynamic amount of rows to a table. The number of rows I need to insert will be the difference of rows from columnA on sheet1 to the number of rows in columnA on sheet2. I am assuming creating a function within my macro will be the best way to go about this. I appreciate...
  8. MarkCBB

    Vlookup - editable index

    Hi there, This question is more out of curiosity than necessity. Does anyone know of a Function that has been made that adds an argument to the vlookup Function that allows for the index column to be choosen as the result column is choosen. i.e. =vlookup(A1,2,C:F,4,0) the 2 is the index...
  9. W

    UDF that returns arrays from if, then, else...

    Hello, I am new to this forum and I am new to Excel VBA. I apologize if this is redundant with another thread or post, but I have looked high and low via google and on this forum and have yet to found what I am looking for. I started with a simple if, then, else function as follows...
  10. J

    custom function parameter assistance

    Hi there, I built a custom function in vba. When called from a cell in excel, I want the parameters to pop up to assist the user as they would for a built-in excel function. Is there a way to do this? Example of kind of function I'm talking about: function test (hello as Integer) As...
  11. T

    Custom function not working - Excel 2007

    Hi, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> <o:p></o:p> I have a problem with a custom function which does not calculate correctly. This does not seem to be an issue with manual/automatic calculation settings, nor (I think) related to whether the...
  12. J

    Logical Check: ISUPPERCASE

    I'm trying to figure out if there is any way of performing a logical check (possibly by way of a custom function?) to ascertain whether a cell contains a text string (no numbers) and is all in upper case (or lower case, or Proper Case). The reason for this is that I receive approx 10,000 rows...
  13. S

    Public Function to pull query

    Can anyone help me with the following code, I am trying to write a Function that will execute a query and show the results. This is as far as I have been able to get with my limited knowledge, any help will be greatly appreciated... In case you are wondering, I have verified that the connection...
  14. D

    Custom Functions

    I am writing some custom functions to be saved in an Add-In file, but am having trouble saving named ranges. I would like named ranges in the Add-In file to be available in other spreadsheets. Is there a way to do this? Or is there a way to take a range from Excel and save it into a globally...
  15. eschiesser

    Custom IF function

    hi all In an effort to save time, i've wasted a lot of time using the IF function to create this...
  16. J

    Custom VBA VLookup Formula

    I'm having a hard time getting a custom vlookup formula to work. I need to be able to change a part of the range in the vlookup dynamically based on a cell value. This is what I came up with but it gives me a value error. Can anyone help? Function VL(val As Variant, RNG As Range, col As...
  17. P

    Weeks Cover for Inventory

    Hope some can help - My problem is I wish to write a custom function which I can Use to calculate the weeks cover of current inventory based on a sales forecast. the forecast is in weekly buckets so I was thinking using some form of loop statement within the function which basically starts with...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top