1. JenniferMurphy

    How to define a variable in one UDF that will be available in a sub-UDF?

    Is there a way for me to declare a variable in a UDF so that it will be available to any UDF that it calls? I tried Public varname as double Global varname as double but they both got error messages. A search turned up several webpages about global variables, but they all seem to indicate...
  2. H

    Pivot Table List Order

    Hi All, I have tried and failed to work out how to modify this recorded line of code to allow me to use variables. The line is based on reordering a pivot table hierarchical field into the order that I want. I’m doing this as I can’t use Custom Lists as the list far exceeds the limit allowable...
  3. J

    Reference variable between two modules

    I have two subroutines in the same module named: Sub JT() Sub TJ() in Sub TJ I want to use one of the variables I defined in sub JT()
  4. A

    Localizing Variables

    I am stuck on local vs global variables. If you call a variable within a sub as "sub test(a as Integer)" is a now a global variable? I have simplified a lot of code to the below to demonstrate the issue. Right now I have put in another IF statement using the tmp variable to flip cl_min and...
  5. A

    Propertry Get / Form Usage

    If I want a Form to 'remember' some values I can't unload it and then use Property Get? Correct? The right way woudl be to Hide the Form only. Then the Form Variables using Get will work 100%. This is no need to ever unload the Form?
  6. kelly mort

    Compare two variables from two different events

    I am looking for a way to capture a textbox data with two variables then compare to see if they match or not. That's, when I enter the textbox, I want to capture it's value. Then when I Exit that textbox, I want to capture that value as well. It may happen that I just enter and leave or I...
  7. D

    Assigning values to variables

    I have some code where I assign values to variables: 'assign values to variables Combo = Worksheets("Home").Range("Y5") LastRow = Worksheets(Combo).Cells(Rows.Count, "A").End(xlUp).Row + 1 'number of first empty row in column A of Combo...
  8. M

    Having the same table auto populate with different variables.

    I have a spreadsheet where i input variables in I2 and I3 (SHEET 2)where after if computes in a dozen cells gives me (3) answers in K9, L9 and M9(ALSO ON SHEET 2). On sheet 1 I put answers to the same (3) cells from sheet 2 dozens of times with different variables. Currently i goto the...
  9. S

    Macro needed to fill cells based on another cell value in a different sheet

    Hi guys, if anyone can help me get the macro for this to work, it would be amazing! My VBA is lacking a little and am losing my head over this - any help would be greatly appreciated: 'if any cell value in range L3 to P73 is = 2 in the OLD v New Check Sheet 'then find corresponding cell in...
  10. P

    Large Conditioning Statements in VBA comparing variables

    I have a situation where I would like to compare variables 27 different times, and output the results to a MsgBox. Even a simple true/False would work. Test 1 would have variables A & B Test 2 would have variables A2 & B2 Test 3 would have variables A3 & B3 .... Test 27 would have variables A27...
  11. mzza

    "Looking up" based on concatenation of values, some of which fall within a range of x to y

    Hi, I'm not convinced there's a way of doing this without using VBA which I would really like to avoid, but here goes... I have been tasked with matching 2 spreadsheets from entirely different sources. Each is a list of distinct vehicles with a unique identifier (which is proprietary to...
  12. A

    More than 255 series in a chart (sort of)

    Hey guys So i know that 255 is the maximum number of series that excel can plot. However would excel be able to plot more than 255 series on a graph but only having 7 or so displayed at one time? I am trying to make a dynamic chart that changes what series are plotted based on different...
  13. D

    determine which number is not displayed

    in a1: 57 in a2: 35 in a3: 22 these numbers may change. In c1 and c2 will be 2 of those numbers. What is the most eficient formula in c3 to display the third number. In addition, if in a vba code i have 2 variables, each with a different value from a1:a3. How do i get 3rd variable to be the...
  14. S

    Object Variable or With Block Variable Not Set

    D = PA.Worksheets(g).Range(Cells(B, "A"), Cells(2, C)) receiving an error on the above line, not sure what is causing it...B, C are both integer variables, g is a string variable, and PA is a workbook variable. Syntax?
  15. N

    transferring data from one sheet to another

    HI, I want to transfer data from one sheet to another sheet. The data in the main sheet has several tables and i need all data on the next sheet in terms of cities and corresponding variables.
  16. D

    Return the next and previous multiple of 1000.

    Hello all. I am looking for a way to find an integers (stored as a variable) nearest multiple of 1000's, both above and below. For example, if a variables value is 5012, I would like to have 5000 and 6000 returned as two additional variables. Any ideas?
  17. E

    How to create a relationship graph between two variables?

    Hello! How can I create a relationship graph of two variables please? For example: Variable Y1 Variable Y2 Variable Y3 Variable X1 23 52 53 Variable X2 52 24 36...
  18. B

    Optimise variables

    Hi Peoples, I have x2 cells (user variables) - which through data processes procure a value in another cell. Please - any suggestions as to how to optimise such? Thank you.
  19. D

    Can someone help me with the syntax

    'declare variables Dim combo As String 'Combo worksheet name Dim SortTable As String 'Table name that needs sorting 'assign values to variables combo =...
  20. S

    Change the size of a range

    I have a range defined by two variables. Both variables are located in a single column. I would like to select and copy the cells in the adjacent range. How can I expand the selection defined by the values in the first column to include the values in the second column. I tried the code below...

Some videos you may like

This Week's Hot Topics