loop

  1. E

    loop of urls

    Hi I have a code that open a webpage then copy it and paste on a1 I want to know if there is a way to add a loop that take 10 webpages and paste tham on columns a1-i1 my code: Sub test() On Error Resume Next Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") IE.Navigate...
  2. S

    Loop through multiple rows per iteration with Excel VBA

    How can I convert my Excel VBA code, which currently loops by each row, to loop through 10,000 sets, with each set containing 20 rows? I understand that the Step function might work, but I can't figure out how to amend my code to enable this. Basically, I would like to "paste" an array of 20...
  3. C

    Loop a range and skip rows in Excel Worksheet

    I have an excel worksheet that accepts input from another excel file. This excel file has structured data in which I need to separate individually as sheets. I already have the following code to copy and format that data in a certain range but I need to loop this process for the whole worksheet...
  4. J

    Solver Loop VBA?

    Hi, I have a problem with the solver function. I am trying to use VBA to loop a solver function from J through Q, and cannot figure it out... This is the formula that is making this table possible: SolverOk SetCell:="$J$14", MaxMinVal:=1, ValueOf:=0, ByChange:="$J$6:$J$12", _...
  5. S

    Run-time error '1004

    Hello Experts: I have a rather irritating problem that does not make sense to me and I am hoping that someone can help please. I have some code that: Creates a list of files to be opened Opens each file in the list and scrapes some specific data from each file opened if present Places the...
  6. G

    Looping Solver VBA Question

    Greetings! Im trying to run a solver loop that will loop through and optimize for the highest return possible on a yearly basis. See image. What I want to do is use the previous years returns across the 7 asset classes shown to optimize the weights invested the following year in the hopes that...
  7. T

    Input Box to Delete Columns

    Goal: Need an input box where the user enters in numbers. if this is not possible, maybe loop the input box until the value is blank? This is where I am stuck on how to go about this. The numbers entered are searched through each worksheet in the workbook Row 12 is where the numbers are...
  8. L

    VBA exit Loop Until statement early

    Hi All! Happy Monday! I have a unique situation that I can't seem to find a thread for (or a YouTube video ;)). I have a macro that completes several pieces of coding... and based on what happens, the user might end up having to copy/paste information from another program into the Excel file...
  9. P

    Inserting rows in range based on cell value within a loop

    Hello all. I am trying to create a tool that will improve my life by importing, massaging and exporting data in the form I need. So far I have a separate submodule that imports all the data into excel, does some filtering, then combines the data side by side on one sheet. Heres the issue. Each...
  10. C

    Counting Rows Between Two Values and Get Average Number of Rows

    Hi Guys, So what I want to do is count the number of cells between two cell values. Cell values change; the first cell value range is between 100 and 101, and the second one is between 101 and 102 and so on. Another problem I'm having is that I have to do this for each student Id and get the...
  11. M

    VBA Question - Looping and Variable Table - Not actual table

    Hi, I am an amateur with VBA, but have been using MrExcel and various to put code together for a project I am working on. I am currently stuck on a part where I have 2 "Table" copied to a sheet. The "tables" are variable in the sense of Rows, since there could be 1 query on it or 10 for...
  12. Johnny Thunder

    VBA Help - Build Formula based on Variable Count

    Hello All, I am working on a project that has several macros but there is one piece of the puzzle I am unable to completed. I will do my best to explain what I need visually. I have a loop that looks at a sheet (Timing Assumptions) and based on a row called Percentages, the user is able to...
  13. G

    VBA Loop for copy and paste with search

    Hi There, Thank you in advance for taking the time to read this. I've tried to search for the answer but to no avail so I'm hoping some very kind person will be able to help put me out of my misery. I'm trying to search for a specific term within a column of a worksheet, if that is found...
  14. S

    Referencing a big number of ToggleButtons

    I have a table which has a ToggleButton next to each line. I would like to write a script that does something for each line of the table, but only if the ToggleButton on that line is pressed. Is there a way to define the if condition in an elegant way? I would imagine something like: For i =...
  15. B

    Reiterate group of columns based on cell value

    I have a start date and end date. For each quarter I want to automatically create a group of columns (L:Q). Once it gets to zero quarter remaining the program ends.
  16. N

    How do i put the last value of a loop from a vba program into a cell in excel

    i have a do while loop w a nested if statement, it is for iterations for the bisection method for finding the root of an eq. i woud like to know how to put the last iteration in cell C2 please an thank you
  17. E

    Use VBA to loop through all the .txt files in a folder, then transfer the content to an excel sheet

    This is the base code. This code works perfectly fine. It reads data from a .txt file and import the first 160 columns to an excel sheet. This code can be re-used on multiple files (doing data importing and appending). For example, the first time I run this code, it will import all the data from...
  18. G

    loop through text files using VBA and extract information

    I work for a sheet metal manufacturer and would like to use VBA to loop through a directory of text files (that are created as setup sheets when machine programs are generated) and extract meaningful information to Excel for further analysis. All of the text files are generally structured the...
  19. J

    Loop through Data Validation list in Advanced Filter Copy Paste all Results on one sheet

    I am having an issue with looping through my advanced filter that loops through a data validation list then needs to copy each filtered data result into one sheet, one after another. I am able to get the data validation to loop through each drop down selection and filtered each persons results...
  20. M

    Looping through a Column on One Sheet and Posting to Specific Cells on a Second Sheet

    I will try to simplify this problem so that maybe someone can provide an efficient solution. I am dealing with an accounting application that I created in Excel, and I cannot seem to get the data in the format that I need. The attached workbook is a simplified version of the application...

Some videos you may like

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top