function argument

  1. A

    Is it possible to return a value from a Function "ByVal" and not "ByRef"

    Hi, My question might sound a bit illogical and even I never thought about something like this before I encountered a problem myself. Let me try to explain what I am looking to do. Here is the code I have, it is only one function and there are a few others in the module but I think this should...
  2. A

    Formula inside the TREND function

    <dir>I would like to use fomulas to generate y-values on the fly to be used in a TREND function like =TREND({sum(5,A1),sum(1,A2)},{3,2},7). But this doesnt seem to work as it seems input array elements are not allowed to be formula themselves. Storing sum(5,A1) & sum(1,A2) on other cells and...
  3. A

    Consolidating test if value exists before consolidating data?

    Hi So basically I have a created a code which asks the user to pick a folder which it then consolidates those file which are in the folder to a master sheet from multiple excel file. I want the code to test if the file is already imported by referencing the data already on the master sheet...
  4. C

    Created a Public Sub in Personal but Can't Call It

    I created a macro in Excel 2013 and saved it in personal.xlsb. I then went into VBA and added an input into the macro. -Should I specify this as a function or a sub? I am not sure when to specify one versus the other -Can a sub have an input? -example: Public Sub Namecall(Cellinput As...
  5. W

    Sum Values from multiple sheets based on Summary Sheet Value

    I was hoping someone could help with this code, is it possible to modify the "ArgList" to include sheet names that are represented by a number which is at least 6 characters? I want to include all newly added sheets even though I'm not sure how many might be added. Option Explicit Function...
  6. K

    Creating a function with a Boolean variable

    I'd appreciate any insight from someone experience with writing VBA functions. I am trying to write a function that returns a Boolean value. The function has two arguments, a Range argument and string argument. The function is supposed to take the value of a string and search a range for...
  7. D

    How to Pass ranges in functions so correct cell in range is passed?

    I have a row with the Year and Month in each cell in the format 201401 (YYYYMM). 201401 is in A1 The progression is 201401 201402 201403 ..... 201512. If I named the Range "YYYYMM" (=Sheet1!$A$1:$X$1) Excel will automatically put in the proper value- if I put =YYYYMM in B1 it will...
  8. J

    How to stipulate multiple function arguments using the 'IF' function

    I need my spreadsheet to use one formula that uses multiple 'ifs' in 1 field. In plain words formula in A3 should read something like, if A2 is 100 to 220, then 40+ ((A2-100)/2); AND if A2 >= 220 then 100; AND if A2<=100 then 40. I can't figure out how to write the multiple functional arguments...
  9. C

    I need VBA Script Help.

    Hello. i have my list of order and i want it convert it into a specific set of code. <colgroup><col><col><col><col><col span="2"><col><col><col span="4"></colgroup><tbody> OOGO1.O1.13 Size 30 31 32 33 34 36 38 40 Total 32 2 3 3 0 4 3 1 0 16 34 0 1 2 1 1 2 1 1 9 Total...
  10. P

    Help for custom functions in xl2010 windows8 server

    I have written a custom function with the signature: Function Contains(TestRange As Range, CriteriaRange As Range) As Long The function works with no problems. When I click the "fx" button to right of the range name box, a pop-up appears to allow me to select a function category...
  11. J

    how to pass a range to a function; the starting cell is known, ending unknown

    The function definition looks something likePublic Function xyz(Rng as Range) If all the cells are defined, I can call it with =xyz(C10:C55) Each time xyz is required, the starting cell in the column is known, but the last defined cell in each column may change with new data. Cells before...
  12. T

    If function nested maybe XL97

    I need to have a function that works out retention from each progress claim when the retention is deducted at rate of 10% of contract value until 5% of the contract value is reached with the relevant progress claim showing any balance retention figure up to the Max claimable 5%. The formula I...
  13. N

    256 char limitiations on functions

    this is a copy of a previous post on summing a text string. Example: 21+12+13..... The string is of variable length with the possibility of 256 or more chars. Try Jindon's Function SumInCell(ByVal txt As String) As Double SumInCell = Evaluate(Replace(Application.Trim(txt), ",", "+")) End...
  14. D

    Function help

    I created a Function in a Module. In my UserForm, I call this function to return a value. For example: Function name1(variable1 as string, variable2 as string) as long Dim Count as long ..Count something name1 = Count End function When this function returns from the calling routine...
  15. R

    If function, create a certain value within a number range.

    Hi! I need some help creating a formula to help making my scheduling more automatic. This is the problem I need help with: I need a formula to create a value for me if a number in a specific cell is within a certain number range. exemple: If A1 is between 0 and 39, if true 0, if false 0...
  16. R

    MATCH Function

    Using the MATCH function, I want the lookup_value to be a blank cell. I have tried =MATCH(,O18:O72,0) and =MATCH("",O18:O72,0) but neither work. How do I set the lookup_value to be a blank??<!-- google_ad_section_end -->
  17. G

    sorting and matching data, then giving a corresponding output

    I have a array of data that import from a sports analysis package, in the form of letters and numbers, e.g. A1, BC20, DD31. I want to search through this array of data (in rows) and find particular combinations, for example, any within these ranges DA23-DA26, DA31-DA34, DA39-DA42 (these ranges...
  18. V

    helicopter airtime, log total

    hi could anyone help me with writing a "simple" formula/function. many thanks in advance. i have a log file that writes data to a csv. spread sheet every 60secs. it reports the running time of a simulator program, in seconds. each time the program is launched anew, the counter will begin back...
  19. S

    VLOOKUP Function's Table_Array Argument

    I am using the VLOOKUP function in a worksheet named REC-ISS in a workbook named EE-Cardex.xls. However, the Table Array to be referred is B22:P33 in different worksheets, in another workbook named MPR-Jun10.xls. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"...

Some videos you may like

This Week's Hot Topics