var2

  1. S

    [VBA] how to return nominal name (not content) of a variable?

    Sub Test() Var1 = 1 Var2 = 2 Msgbox VarName(Var1) Msgbox VarName(Var2) End Sub Function VarName() End Function Preferably, the above msgbox will result in pop-up window with "Var1" and "Var2", instead of 1, 2. Is it possible? Thanks a lot!
  2. M

    Conditional Variable for Pivot Table Filter

    Is it possible to make var1 in the following code conditional to its existence or not? Basically i'm trying to use a pivot table to help produce a report on attendees for each day of our event. var2 will always be a selection but var1 will eventually have Friday Only, Saturday Only, Sunday...
  3. James_Latimer

    MMULT in VBA - 1004 error

    Excel 2016 I was hoping someone could give me some pointers please, i'm having some issues with the following and can't quite understand why. I have the following code Dim var1 as Variant, var2 as Variant var1 = Sheets("Sheet1").Range("R16:AC16") var2 = Sheets("Sheet2").Range("P4:P15")...
  4. A

    How to refer to multiple variables

    I am trying to select a range of rows, then hide or unhide them. here is some sample code: Dim Var1 as range Dim Var2 as range Set Var1 = Sheets("Sample").Range("22:25") Set Var2 = Sheets("Sample").Range("28:33") Range("Var1,Var2").EntireRow.Hidden = True (this is the error line) I get an...
  5. X

    Convert String to Range

    Let's Say I'm preparing a UDF which involves something with ranges. Now consider this piece of code Dim Var1 As String Dim Var2 As String Dim Rng As Range Var1 = "$A$1" Var2 = "B4" Rng = Range(Var1, Var2) The problem with this is it returns Rng does not store it as range, but instead...

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