variables

  1. B

    Loop through variables which defined as range

    Hello, how can I loop through ranges. What I have already tried so far. Is it possible? Dim Variabel as Range Dim Variabel_1 as Range Dim Variabel_2 as Range Dim Variabel_3 as Range Dim I as Long ' the ranges are as an example Set Variabel_1 = Range("A1") Set Variabel_2 = Range("B5") Set...
  2. G

    Online scoreboard

    I wish to create a scoreboard for pool matches on a live stream as an overlay image. I was thinking of using an external button box to change the variables within an excel file which then in turn changes said variables on my overlay. The variables I would require would be: Player 1 name...
  3. VBE313

    How can I select the next item and next item and next item?

    Private Sub CommandButton1_Click() For I = 0 To Me.ListBox4.ListCount - 1 If InStr(UCase(ListBox4.List(I, 1)), UCase(sFind)) > 0 Then Me.ListBox4.TopIndex = I + 1 Me.ListBox4.ListIndex = I + 1 Exit For End If Next I End Sub...
  4. H

    Return multiple variables from a Function

    I am relatively new to programming. I am trying to return multiple variables from function. I have read a couple of posts that outline that this is not possible. They suggest that this can be solved by passing a array. I understand how to do this, however what if one of the variables is an...
  5. B

    Easy VBA Loop Through Variables Looking for Boolean Flag

    Hi All, I'm attempting to write a code that looks through a potential of 50 different Boolean variables and creates a new variable "YES" if at least one is flagged yes. I am extremely new to VBA and just know basic loops. Any help would be appreciated. Thank!
  6. O

    relationship among four variables

    How can i get the relationship among this 4 variables a = no of days = 30 b = rates/number of holes/ma = 315.81 c = expected monthly target (number of holes) = 240 d = expected production amount = 75,795.36 (Naira) regards
  7. O

    Dividing Variable Ranges or Strings

    I am trying to get a range to divide itself by itself divided by a different range, and then multiplied by 12. I wrong the code below in an attempt to achieve this, and keep getting an error stating "Compile error: Object required". I have tried changing the "AnnualizeMonths" and...
  8. R

    Outlier detection and removal from ranges

    Good day, I have a two ranges (for X and Y data) that I graph on a userform using the traditional method of graphing, exporting to image, and loading the image into a picture control. Oftentimes, the data in the Y data has a few errors in terms of outliers (X data is just dates). I'd like to...
  9. D

    Excel Solver Question

    Hello- I am stuck on Excel Solver question. I have 4 decision variables used to determine thresholds for items to stock in warehouse. From a list of of all items, by changing these variables in any combination, I can identify new opportunities to generate incremental revenue. I have a binary...
  10. C

    RE: Expressing Application.onTime("00:00:10") as a variable...

    RE: Expressing Application.onTime("00:00:10") as a variable... I just want to be able to vary the time to display a MsgBox using a variable from a cell value on a sheet using Application.onTime("h:m:s"), where h, m and t are variables In the title, a variable evaluates to 10 seconds. Would...
  11. B

    shortcut for changing formulas?

    Hello, Experts. Novice here. Seeking advice. I have a workbookcontaining many spreadsheets pertaining to data pulled from many locations/sites. This data is sorted by site as well as by the manager responsible for the site. And each manager has several sites. Each spreadsheet shows each...
  12. A

    Variable within a variable

    I am setting up a Form in VBA. I have all of my variables and types set properly. The purpose is for units with unique numbers and varying counts. So item number 100 may be made up of 30 pieces. I can have multiple unique items per order. My form gets a total number of items, then asks for each...
  13. E

    DAX LOOKUPVALUE with IF/OR included?

    Hi Guys (and woman), I've been wandering on this forum for a bit now but cannot find the answer. I'm a bit of a newby when it comes to power bi/power pivot so I hope you can help me out (I'm using power pivot bytheway). What I would like to have is the following: I have a look up table with 4...
  14. N

    Grouping a pivot table by variable groups

    Hi, I am trying to come up with VBA code for a pivot table where by the row groupings change depending on the numbers in specific cells. For more context, I have a 70,000 row list of consumption amounts which i would like to be able to split depending on the way i have split some tables in a...
  15. 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...
  16. 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...
  17. 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()
  18. 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...
  19. 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?
  20. 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...

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