passing

  1. D

    VLookup not working in VBA

    Hello, I'm attempting to do a VLookup in a macro while using the Match function to dynamically determine which column to look in. I did some testing by sending values to a Msgbox to validate I am passing the correct values. Ex: MsgBox "Match Value is : " & Match1 <== the value was 13...
  2. T

    Passing argument via the calling procedure

    Looking at this: https://www.mrexcel.com/forum/excel-questions/573357-prevent-vba-editor-being-opened.html in particular this code: CBTProc = CallNextHookEx _ (lCBTHook, idHook, ByVal wParam, ByVal lParam) What is the significance of adding ByVal? My understanding...
  3. L

    naming a function same way naming a range

    Hi I have nested if() i.e. =if(cond1, "a", if(cond2,"b",if(cond3,"c",f))) I want to know if I can name that function to for example XYZ and use that name to pass it to another function instead of passing the whole function. Similar idea of naming a range A1:A20 as ABC and then use it as...
  4. ChuckDrago

    Passing a value instead of a formula

    Hi everyone, I need help on a syntax question. I am passing information between two workbooks. The fields in question are all values except one that contains a formula. The formula displays the resulting value and that number is what I need to pass. The code below shows the...
  5. T

    Array not passing to function

    I believe I have an array function IF statement that returns an array that I then try to pass to a user function to perform further processing of the data before returning to the workbook with the final array answer. However, it appears as though the user function isn't even getting ran. I set...
  6. D

    questions correct to reach a passing percentage formula

    looking for a formula that will help me calculate how many more questions correct are needed to reach 75% accuracy in this table. is there a way to use a formula to find the number of questions in the data table? https://ibb.co/nCiQFG
  7. K

    Passing Arguments

    Very beginner question: what does it mean to "pass arguments"?
  8. V

    Passing a cell value to a function

    I am looking for a user defined function which will call a message sub routine using the application.ontime method . I am passing arguments to the function that will execute at a certain time taken from selected cell . But my function doesnt work . I dont understand why. Can anyone help me with...
  9. C

    Passing optional arguments with named parameters from the spreadsheeet to a custom function (UDF)

    This is not about passing optional arguments within VBA. This is about passing optional arguments from the spreadsheet to a custom function written in VBA. I've been surprised to find not a single mention of passing optional arguments, especially named parameters, from the spreadsheet. Here's...
  10. S

    Passing a row into a function

    How do I pass a row into a function. For example if i have a hypothetical function named hypothetical and I am running it on Row 10, I want it to pass row 10 into the function. i.e. =hypothetical(10). If i have the rows filtered and visible are rows 10,15,20. Then I want to drag down the...
  11. S

    Vba syntax question: Passing variables into Function, returning array of longs

    Something like... dim retArray (0 to 1) as Long reDim retArray ( 0 to 1) retArray = doSomething(wSheet, searchVal, rngStart, rngEnd) ( Function doSomething(w, srch, begin, end) () retArray(0) = 100,000 retArray(1) = 5 doSomething = retArray End function The psuedo-code...
  12. T

    Passing a Variable between Workbooks

    Hi, I have a number of workbooks - one main file and several templates. In the main file a variable is assigned 'poolID'. Each of the templates is then opened in turn and macros within these templates are run (with Application.Run), however each template uses the same variable. I currently...
  13. G

    referencing names of a checkbox in a sub or function

    Hi, Hoping someone can help here, Ive got quite a major hassle and been searching for an answer for some weeks, (it may be because I am using the wrong keywords so apologise if this is trivial)! I have 40 tests that are done on a piece of equipment, but not every test is done each time. I...
  14. 1

    Link to workbook using nominated cell text referencing

    Hello, I am wanting to link to a seperate workbook cell using the formulae ='[INF_Cap_8400-8051.xls]Infra Cap'!$C45 BUT instead of using the workbook to link to the cells of interest I would like to use text in Cell B1 for example. <TABLE style="WIDTH: 127pt; BORDER-COLLAPSE: collapse"...
  15. B

    Pass Variable back to Sub that called Function

    Hello all, I have a sub that is calling a funciton. The function needs to set a flag and send this flag value back to the sub. The sub will then perform based on the flag value. I can't seem to get the flag to be sent back to the sub. Can someone please help me figure out what I'm doing...

Some videos you may like

This Week's Hot Topics

Top