excel-udf

Excel 2011 - How to change output of textJoin from value of cell, to the cell name, so I can put it in Sum() to add those values

拥有回忆 提交于 2019-12-25 01:05:51
问题 I'm using the textJoin UDF listed below to combine values from various rows into a single cell; it displays each value. However, I want to know if I can manipulate the output of this UDF so that instead of simply displaying the values I can add the values and get the sum of the values. Or ideally, if I can just modify variables to instruct it to ADD the values. Does anyone know if this UDF (which I didn't create) can be instructed to output the Cell names (A2, B2, C2), and if so can I put

How to keep reference to add-in UDF when workbook moved to different folder than add-in?

て烟熏妆下的殇ゞ 提交于 2019-12-21 14:06:47
问题 I wrote an Excel add-in that provides UDFs (user-defined worksheet functions). All is well until one user sends his workbook using those functions to another user, or just tries to use the workbook on more than one computer, where the add-in has been installed to different paths. Even if the only difference in the paths is the drive letter, when the workbook is opened on the other computer, the old full path appears on the formulas in front of all the UDFs, and the formulas return an error.

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

余生颓废 提交于 2019-12-21 06:05:27
问题 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 = Excel.Application.WorksheetFunction.RTD("StackOverflow.RtdServer.ProgId", "", start) End Function This works. I have attempted to create a C# wrapper as follows: [ClassInterface(ClassInterfaceType.AutoDual)] public class RtdWrappers { private readonly Microsoft.Office.Interop.Excel.Application

UDF using FindNext seems to abort without warning

随声附和 提交于 2019-12-20 05:45:05
问题 I have the following user-defined function, which attempts to find the nth non-empty cell in a range: Option Explicit Function finn_prioritert_oppgave(nummer As Long) As String Dim i As Long, r As Range, c As Range Set r = Range(PDCA.Range("L9"), PDCA.Range("L1048576").End(xlUp)) i = 1 Set c = r.Find(What:="*", LookIn:=xlValues, LookAt:=xlWhole) While (Not c Is Nothing) And (Intersect(c, PDCA.Rows(9)) Is Nothing) And (i < nummer) Debug.Print c Set c = r.FindNext(c) Debug.Print c Debug.Print

Argument type validation in the Function Wizard

橙三吉。 提交于 2019-12-13 05:13:05
问题 In Excel, the DATE function for example shows "=number" against each field. If I enter a string in these fields in place of a number, I get the #VALUE! error. Can similar functionality be achieved with Excel-DNA? 回答1: I don't think Excel supports a way to show those types for user-defined functions. Excel-DNA registers functions with the right types (like taking a Double). Excel completely controls how things are displayed in the Function Arguments dialog, and some aspects only work for built

Circular Error in VBA User defined Function

♀尐吖头ヾ 提交于 2019-12-11 17:47:43
问题 I am new to the VBA programming and have written a VBA function for interpolation. I attempt to get the input from cell C17 and other cell in column Cto the function "WindPressure" The function then gets the input from column C( Height above ground z (m) ) and interpolate to get the design wind pressure, but I fail due to the circular error. The code is as follow: Function WindPressure(z As Double) As Double Dim Row_Nos As Integer Dim x1 As Double Dim x2 As Double Dim x3 As Double Dim y1 As

How to reuse Core VBA functions (UDFs) across projects, but not show them in cell insert function

一笑奈何 提交于 2019-12-10 13:11:47
问题 I have an Addin with "core" functions and subs that I want to reference and use in different Addins or VBA projects. Because of the code reuse and single update principles. For example, a function, that filters collection members based on criteria and returns a sub-collection. The code itself is not an issue here. Public Function listNamesContaining(ByVal NamesInput As Names, ByVal ContainsCriteria As String) As Collection Dim NameMember As Name Set listNamesContaining = New Collection For

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

拟墨画扇 提交于 2019-12-03 20:38:37
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 = Excel.Application.WorksheetFunction.RTD("StackOverflow.RtdServer.ProgId", "", start) End Function This works. I have attempted to create a C# wrapper as follows: [ClassInterface(ClassInterfaceType.AutoDual)] public class RtdWrappers { private readonly Microsoft.Office.Interop.Excel.Application _application = new Application(); public object Countdown(object startingCount) { var start = Convert

Excel 2007 UDF: how to add function description, argument help?

放肆的年华 提交于 2019-12-03 07:39:59
问题 The description I am writing a couple of Excel UDFs in COM Servers. I'd like to get the standard help ( Insert Function dialog) that you get when you press fx . Yes, I can see my COM Server listed in among the Category drop down, but I also see Equals, GetHashCode, GetType, and ToString (which are fairly undesirable to expose to the Excel user), selecting my COM Server brings up the *Function Arguments*[1] dialog with no argument information and no description of the function. Here is the

Excel 2007 UDF: how to add function description, argument help?

只谈情不闲聊 提交于 2019-12-02 21:07:53
The description I am writing a couple of Excel UDFs in COM Servers. I'd like to get the standard help ( Insert Function dialog) that you get when you press fx . Yes, I can see my COM Server listed in among the Category drop down, but I also see Equals, GetHashCode, GetType, and ToString (which are fairly undesirable to expose to the Excel user), selecting my COM Server brings up the *Function Arguments*[1] dialog with no argument information and no description of the function. Here is the lameness that I get: Insert Function dialog http://www.iwebthereforeiam.com/files/Insert%20function