Questions tagged [excel-udf]

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).

99 questions
3
votes
2 answers

Excel UDF not appearing in drop down menu

I wrote a User Defined Fucntion in Excel. It works great with no issues. I even wrote a description for it under the object properties menu. The problem is, my UDF never shows up in the Excel drop down menu that appears when I start to type a…
user2993456
3
votes
2 answers

Building a fast Excel VBA UDF for multi-key lookups

I have several quite large data tables in a single workbook and need to make an Excel user-defined function to lookup data in those tables. I need to be able to provide a variable number of key columns and key values to search for and the function…
GreggR
  • 41
  • 3
2
votes
1 answer

how would you write an excel udf that's manually calculated regardless of calculation mode?

I currently have a macro that uses a form in order to perform some calculation with the help of an external program. All it does is writing some worksheet values to a file for use by another program, an external .exe, as input (that program is…
s_a
  • 885
  • 3
  • 9
  • 22
2
votes
1 answer

How do I create an Excel automation add-in in C# that wraps an RTD function?

I have a working RtdServer-based automation add-in: How do I create a real-time Excel automation add-in in C# using RtdServer?. Creating a VBA wrapper is trivial: Function RtdWrapper(start) RtdWrapper =…
Frank
  • 3,029
  • 5
  • 34
  • 43
2
votes
1 answer

Function is called without being called and stops the main macro

I have this Sub which does 2 basic calculations in a loop and then I have a UDF (see below). My issue: When I run the Sub BSM_Table it calls the function at this line: If Cells(i, 2) > 0 And Cells(i, 3) > 0 Then and the sub stop. I guess it is…
manu
  • 942
  • 8
  • 17
2
votes
1 answer

excel function syntax calling error

I've created this function: Public Function getLastCellValue(ByVal row As Integer, ByVal column As String) As String If (Cells(row, column).Value = "") Then getLastCellValue = getLastCellValue(row - 1, column) Else: getLastCellValue =…
michael
  • 146
  • 3
  • 19
2
votes
2 answers

Excel VBA cell returns "0" despite having value

I'm working on a task where I need to get an access token for the Google Analytics API from Excel using Google's oAuth 2.0 integration. The initial request works by passing in the client id, secret key and the authentication token which are stored…
Dan Ellis
  • 5,537
  • 8
  • 47
  • 73
2
votes
1 answer

UDF to remove special characters, punctuation & spaces within a cell to create unique key for Vlookups

I hacked together the following User Defined Function in VBA that allows me to remove certain non-text characters from any given Cell. The code is as follows: Function removeSpecial(sInput As String) As String Dim sSpecialChars As String …
user2993456
1
vote
1 answer

Deal with trailing unit in Excel UDFs?

Possible Duplicate: Using Excel Built-in Functions on top of the UDF My Excel UDF currently returns a string which consists of numeric data and unit, e.g. 1234 kg. It's straightforward and easy for users to read, but the problem is that it will…
woodykiddy
  • 6,074
  • 16
  • 59
  • 100
1
vote
3 answers

What does "Microsoft Office Excel is waiting for another application to complete an OLE action." mean?

I have a working RTD Excel automation add-in similar to the one described here. Intermittently, while attempting to load a sheet that includes this formula I get the following error: Microsoft Office Excel is waiting for another application to…
Frank
  • 3,029
  • 5
  • 34
  • 43
1
vote
0 answers

Excel range and arguments collding in formula

I'm using the below formula to calculate a sum. The formula only calculates the sum of those values which has the string "Yes" written in the same row under the column "Paid?". I have also written my own UDF that searches a given range for cells…
Jinado
  • 21
  • 3
1
vote
1 answer

Excel DNA UDF obtain unprocessed values as inputs

I have written several helper functions in F# that enable me to deal with the dynamic nature of Excel over the COM/PIA interface. However when I go to use these functions in an Excel-DNA UDF they do not work as expected as Excel-DNA is…
tranquillity
  • 1,619
  • 1
  • 5
  • 12
1
vote
2 answers

How to pass list of values to user defined function (UDF) in Excel

--------------------------------------- A B C D --------------------------------------- Timestamp Stock Qty Price --------------------------------------- 01 February 2011 ST1 100 10 02 March 2013 …
Ishwar Jindal
  • 373
  • 1
  • 2
  • 10
1
vote
2 answers

VBA call webpage without opening browser or returning data

I am trying to create an excel UDF that calls a web page that runs scripts which take values from parameters in the URL. EG: "http://example.com.com/script.php?variable1=123&variable2=456&etc=etc" I have used this after much googling and trying…
Lyndon Penson
  • 65
  • 1
  • 8
1
vote
2 answers

VBA: Return Strings from For Function in 2 Columns

I have no coding background but have always been curious to try it out. I've been enjoying it so far but have recently been stumped. I have exhausted my limited understanding and research on trying to figure this out, so any help is much…