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?
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...
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...
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...
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?
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...
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...
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...
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...
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...
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...
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...
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...
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?
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.
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...