variables

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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?
  6. 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.
  7. 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?
  8. 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...
  9. 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.
  10. 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 =...
  11. 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...
  12. J

    Define Variable in subrotine

    Have a main sub code and then call another subroutine. All variables have been defined in the main code. However when using the variable in the subroutine I get an error that the variable has not been defined. How can I make sure that variables don't need to be defined in subroutines - but...
  13. A

    Using variables in a formula

    How to use variables inside activecell.formular1c1?
  14. S

    How to store PUBLIC variable values for later use in different subroutines?

    According to J. Walkenbach: That's exactly what happens when I check the value of any public and static variables in the Watch window. Public slxRibbon As IRibbonUIPublic Declare Function InternetGetConnectedStateEx Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal lpszConnectionName As...
  15. D

    How to define large set of variables as Long in VBA?

    Hello, I am looking to define an efficient way to define these number of variables. Dim sumCol31 As Long, sumCol32 As Long, sumCol33 As Long, sumCol34 As Long, sumCol35 As Long, sumCol36 As Long, sumCol37 As Long, sumCol38 As Long Dim sumCol39 As Long, sumCol40 As Long, sumCol41 As Long...
  16. S

    Select Case - With multiple variables?

    Hi All I have a bunch of data and I need a why to test if a set of conditions are met, and then do more code if different sets are. For example, 3 variables which are in A1, B1 & C1. I was wondering if there was a way to get a select case type code to work but each case is testing each value...
  17. A

    Passing Variables from One sub to Another

    Hello I want to pass some variables from one sub to another and after doing some research I'm still unsure on how to achieve the outcome I want. Private Sub CommandButton2_Click() If isLoggedIn = False then Get LogIn(Username) End if MsgBox(Username) End sub Private Sub LogIn() Username =...
  18. C

    Collection, class, printing

    I have a collection with a custom class and I don't know how to print the items in the collection. Can someone help me? The collection = datacollection. The class = bobjclass class variables = country name, Amount, Account, Account name.
  19. JazzSP8

    Syntax for Copy / Paste Range using Cells?

    Hey All I can't seem to get the syntax right for this and I'm at the point where I'm understanding it less the more I read :/ I'm trying to copy from one worksheet to another with a variable paste range but I can't seem to get the paste part to work, this is what I originally thought would...
  20. M

    Vba - combine formulas stored as variables

    Hello, Please can anyone help. And please forgive any errors in terminology. I have stored two formulas as variables which I can see are correct on the Locals window. I now want to combine these two formulas together in another cell. So far I have following but I cant seem to work out how to...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top