variables

  1. J

    Column Variable not Working

    Hi, I'm using variable for row and column in 2 different lines of code. But only the row varaible works; the column variable doesn't and I can't figure out why. partNum = Range("$B" & comRow).Text comCat = Range(comCol & "$5").Text Both variable are dimmed as integers. I thought there might be...
  2. J

    Why are there NO quotation marks in my variable. This is the reason why my if statement is not equal (FALSE).

    Hi, Can someone help me with this issue please. I'm searching for ages. My code goes to 'else' when e = 15. At row 15, there is a number/text (C15) that needs to be equal to another number/text (L15). (6002559) When the 'do while' hits e=15 the condition er=et is FALSE, so it goes to 'else'...
  3. P

    Power Query with Dynamic Sample File

    I have a Power Query where I need to reference two different Sample Files depending on a variable: let SourceType = Excel.CurrentWorkbook(){[Name="SourceType"]}[Content]{0}[Column1], SourceLocation = if SourceType = "Fileshare" then "C:\Fileshare" else "C:\Egnyte", Source =...
  4. F

    Create variable within a tab

    I am using Office 365 on Windows 11, all updates are installed. My spreadsheet consists of multiple tabs, each tab has a name, the name is a number that signifies the year (e.g. 2021, 2022, etc.). I want to create a variable that used the tab name. So, I use the formula...
  5. R

    Creating a variable list of columns and ranges to copy to another sheet based off values in cells

    I've got an inputs tab and 3 other worksheets in one wkbk. On my inputs tab, i've got cells I2:I14 that have column letters in it (A, AB, N, E, etc.) - these can be changed so they are variable. They correspond to the other worksheets within the wkbk. So 13 cells of columns to ID while...
  6. D

    Variables

    Hi I have an excel sheet that names a number of cells as variables. For example cell A1 is defined as speed and in formulas elsewhere in the workbook I have used speed in formulas rather than A1. I now want to write a function in VBA that uses speed in a formula. Rather than referring to A1, I...
  7. C

    Use Prompt to Assign variable to Workbook

    Hello all, I have a report I'm working on automating, right now I am working on some futureproofing. Right now I get two base files which do not have a standardized way of saving so calling it out in my current code requires me to change the workbook names every time I write the code. Is there...
  8. B

    Using variables to place the chart on the spreadsheet

    Hi, I draw multiple charts on a spreadsheet. for placing them I use this code: Set rng: Activesheet.Range(A100:N125) that draws me a 25-row high chart to A 100 to N125, working fine when not all the charts are required, I want to be able to select them and place them automatically in the...
  9. littlepete

    inputbox not showing value of cel to adjust and does show when in next cel and going back

    hello :) i am currently working on an inputbox to fill in new data in a new last row, and that's working perfectly ! now i'm trying to adjust the macro to go through all data of an existing row. when going from K to Z it does not show the data of the column in the active row. but when i type...
  10. D

    Problem wir global declared Variable using SeleniumBasic

    Dear Community, I have the following problem: I have written a code to automate from web browser. Where data from excel spreadsheet is used to fill webforms. The code itself works fine. I would like to write the macro in such a way that the user can choose which browser is used for...
  11. I

    FormulaR1C1 + Error 1004

    Hi, I have written some code that looks for column headings to locate the columns of data required in my formula, thus returning a column number. So logically the best method of creating my formula in the cell is to use the FormulaR1C1 function in vba, however I have been unsuccessful in getting...
  12. J

    Beginner Struggles with VBA

    I am trying to utlize the recording feature to learn about the code that controls excel via taking an action and then reviewing the code that is recorded. Recently I was able to get the following code to work: Sheets("GEN INCENTIVE").Select Range("AV1").Select Columns("AV:AV").Select...
  13. M

    Offset "Application.Match" result to find destination cell

    I'll try to be as brief as possible. Here's the rundown. Setup: I have 2 Workbooks. I'm trying to loop through Workbook#1 and for every cell that contains a blue border, I then want to search for that cell value on Workbook 2 (a result SHOULD always be present). Once the result is found, I...
  14. G

    VBA Select range using Find method and variables

    Hi All, I have a set of values in Column A of a worksheet named "Data". Cell A1 has the value as "Description" Cell A9 is blank Cell A10 has the value as "Team Total" The current active cell is D100 I would like to use the VBA "Cells.Find(What:="Description" statement to get to A1 from...
  15. A

    VBA .xlam for multiple workbooks

    Good morning, I have several tools working with which include sometimes the same Subs . So everytime I found an effort on one Sub and change it in one workbook I repeat this in the other workbooks. Wasting time - isn’t it? I want to have one workbook with all Subs inside, soft coded. So they...
  16. M

    Best Way to Clean Up After Running Code

    Curious about the best way to clean-up after running code. I often run code that utilizes Workbook, Worksheet, Range, ADODB.Connection and ADODB.Recordset variables, sometimes all in the same procedure. At the end of the code I set all variables equal to nothing (e.g., Set dbConn = Nothing)...
  17. M

    Userform to modify data in different workbooks

    Hey guys, Hope everyone is doing great. At my current job we use several workbooks to store data regarding different steps of a process. Tehe thing is that some data is the same through the different workbooks. I have been working on a vba app that would allow me to store the data needed on all...
  18. Q

    Table Lookup

    I'm trying to create a look-up formula that fills in cell values in accordance with corresponding variables from different tabs. For example: In the tab "Match-Up", cell "J3", I'd like the formula to display the number of games "Auburn" has played (according to the data found in tab "Auburn")...
  19. D

    Finding approximate value based on interpolation of data

    Hello, I need help with this problem of finding the closest result based on 3 criteria. Using index and match I get the result but only if the result value and the variables are exact match. These are the measurements that I get from device: Variable_1 - B2=59.3 Variable_2 - B3=31.3 Variable_3...
  20. S

    Pass value between two user forms - but txt box and form name held as public variables

    Hi all, I need to pass a value from a text box (frmkeypad.tbvalue.value) to another text box in another userform. But the form name and text box name to pass it to are stored as public variables (formref and fieldref). So something like formref & "." & fieldref & ".value" =...

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