variables

  1. 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...
  2. 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!
  3. 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
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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()
  15. 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...
  16. 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?
  17. 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...
  18. 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...
  19. 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...
  20. 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...

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