variables

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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?
  9. 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.
  10. 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?
  11. 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...
  12. 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.
  13. 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 =...
  14. 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...
  15. 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...
  16. A

    Using variables in a formula

    How to use variables inside activecell.formular1c1?
  17. 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...
  18. 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...
  19. 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...
  20. 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 =...

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