variable

  1. L

    VBA

    Hi all, below is just some of the code I'm working with. There is a lot in between but essentially I need to utilize the Sourcewb in a SumIfs formula but can't seem to make it work. The Sourcewb will already be open and will be closed when this formula is complete. Any help is appreciated...
  2. D

    Carryover variable to called sub

    I am attempting to simplify some VBA code as it has gotten fairly long and is taking an extensive amount of time to run. I have multiple cubes that are updated weekly and I need to copy data from those cubes to a new sheet where I can manipulate and make edits. Rather than having three subs with...
  3. J

    Vba code to generate a list of numbers in random order

    Searching this forum, I found the below code to generate a list of numbers in random order using vba. I'm trying to adapt this code in order to add a new variable (x), so that the upperbound value of array V is the value of this variable (x). Sub Demo1() Dim x, V, L&, R&, S x =...
  4. L

    vlookup to other workbooks with variable sheet names

    Hello all, First time posting so please bear with me. I have gone through all the threads that I can find as well as google and YouTube, but to no prevail. I have a vlookup with ISNA formula which is working fine, however the monthly maintenance is quite time consuming and open to human...
  5. R

    How to use variables from a user form in a macro

    I've got a user form I want to use to determine how to run a macro: Private Sub UserForm_Initialize() 'Reset the form radiotempl1.Value = False radiotempl2.Value = False datatype.Clear With datatype .AddItem "Public" .AddItem "Private" End With radiotier1.Value = False radiotier2.Value...
  6. T

    Worksheet_Change Variable to Module

    Hello everybody :), I am fairly new to Excel VBA and i struggle to figure out how to pass a variable from the worksheet_change to a module where the variable is picked up and is printed. I hope you guys can help me. Private Sub Worksheet_Change(ByVal Target As Range) If...
  7. Jeffrey Mahoney

    TEXTSPLITVAR

    TextSplitVar is a recursive formula to split a single cell or text array by the delimiter and return the variable chosen. It checks the number of variables and provides the last variable if the user asked for too large a number. It also adds one more delimiter at the end on the first iteration...
  8. J

    Image Hyperlink Subaddress - Variable Cell Reference (VBA)

    Ok, all, first time posting on any forum. Just been sitting in the back, reading and learning. But now I'm stuck and decided to ask for help. I need to assign a created image with a hyperlink to a hidden sheet, using a variable address based on the value of a cell. EV36 would be the location of...
  9. andrewb90

    Using a variable to open a userform

    Hi all, I have a number of similarly named user forms that are called based on the value in a cell. I am trying to find a more efficient way to call the user forms without having to add additional elseifs to the code everytime I add a few more. I thought I had the right idea, but perhaps I...
  10. A

    VBA Get column letter based on cell text and use as string

    Hi all, I am trying to find a column letter based on a text ,contained in a cell. I managed to find the letter, but the next part is what bothers me. The column letter(declared as "trcol") is a part of a loop that goes through the table and copies certain values based on that column.So that...
  11. R

    Variable COUNTBLANK??

    So I've a column AA with a load of helper cells in it with equals to "1" indicating the start of a new 'workload' however the type of workload is dictated by the number of gaps in the column until the next 1. I need a way to use maybe COUNTBLANK or other method but only to sum the number of...
  12. E

    (VBA) Having trouble assigning relative cells (from an InputBox) to variables in order to subtract them.

    Hello all! I'm running into an error at the 'Set aa' line: "Run-time error '5': Invalid procedure call or argument". What I'm trying to do is have the Month variable be used to find the corresponding cell in two separate sections of the worksheet (prior month "BU2:CG411" vs current month...
  13. M

    Excel 2016 VBA - Insert a variable

    Hi, Set .SendUsingAccount = .Session.Accounts.Item("123@email.com") work Set .SendUsingAccount = .Session.Accounts.Item(Range("B3").Value) does not work Dim MyEmail As String MyEmail = Range("B3").Value Set .SendUsingAccount = .Session.Accounts.Item(Range(MyEmail) does not work How...
  14. D

    Variable Mortgage Payment Scheduler with Extra Payments and Offset Account

    Hi Everyone, With the way things have become over the past few years, I decided to use my time wisely and started to keep a tab on a few things, one of which is my mortgage. However, I wanted something much more in depth and struggled to find much, specially when it came to variable loan (with...
  15. D

    Power Bi Variables

    Hi, in power pivot I can declare a variable ; VAR name = TableName[Column Name] But when I've tried doing this in power bi I am unable to do this, e.g in the measure below I wanted to put a variable for a Table Column but am unable to do this, , can anyone explain why and who to get around...
  16. D

    DAX Variables used in formula

    Hi, I have a question re variables, which i tend to use as it makes it easier to understand but in the formula I have for a running total in a calculated column I have to use a var or it won't work; VAR aitem = AllandValues[item] RETURN CALCULATE ( [avsales], FILTER (...
  17. S

    Compare and Copy Data from Columns in One Sheet to Another Sheet

    I am looking for a VBA code/macros that does the following... Compare the data in a cell from Column A from Sheet 1 to the data in a cell in Column B in Sheet 2. If the data values are equal, then I want to take the values in the row from Column D in Sheet 1 and past them into the row in Column...
  18. C

    macro to create vbs and pass variable

    The variable to pass is EMailVar Q: need to know how to setup vbs to receive variable Option Explicit ' create a vbs script to receive a variable parameter and send email. 'run vbs script by passing variable 'wait for process to complete 'kill script Sub writeVBScript() Dim s As String...
  19. D

    Declare a variable containing a variable

    Hello all, I have a very simple table date, product code, units and have created a running total measure that allows me , when dropped into a pivot table to retain all of the product I'd 's while only returning a running total for one, in this case 'a' . < abc := VAR mdate = MAX (...
  20. F

    Count (countifs) norm exceedances with variable dates and variable norms formula or VBA

    Hey everyone, I have substance measurement data from water quality checks. The data is listed in a table starting with the date (dd/mm/yyyy). Above the table are the norms. The variable norms are in green. Those norms are generated on a second tab, and change (sort of) weekly. I need to...

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