variable

  1. J

    Calculate sums based on values

    hey guys - this is a tough one and I am in DESPERATE need of your Excel Guru Greatness!!! I have two spreadsheets - one has leads - one has our ICP criteria on it. The ICP has like 10 questions with say 4 possible answers per question. Each answer has a "score value" so the answers are...
  2. T

    Range inside cell reference

    I'm trying to specify a range from L1 to Q where the row value of Q if specified by the value of a cell in another sheet (Let's say Worksheets("Sheet1").Range("N" & i)). I've defined variable j as an integer and set it to equal Worksheets("Sheet1").Range("N" & i) however, when I try to use the...
  3. SanjayGMusafir

    VBA to add new record - Declaring variable

    Hi Experts I was writing following VBA code to add a new record. But it's constantly giving 'Type Mismatch' Error with variable x4 The new record has to be "A 1111" (A + space + 4 digits next to last used) I must be missing some trick. Also, I'm thinking of VBA to ask how many records to add...
  4. 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...
  5. 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...
  6. 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 =...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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 (...
  20. 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...

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