vba loop

  1. R

    Stop macro with loop then resume

    Hi all, I have a macro that I am running to pull a series of data into excel from an internet based API, which is then dumped into my database for further use. The challenge I am facing is that pulling the data takes a few seconds, and I need to stop the macro between changing the date and...
  2. W

    VBA LOOP SUM CONSECUTIVE NUMBERS

    I have a spreadsheet that I need to sum column L, if column J data is consecutive. If the reference is consecutive, they were most likely on the same order and I need to know the total of the order to compare to another spreadsheet. It would be nice if it went from A2 to the last column, but I...
  3. V

    VBA for looping GoalSeek based on If Then

    Hi Have been learning VBA for ~24 hrs, so apologies what may be a straightforward question, but I am trying to write a code for the following: I have the following rows of data in my sheet: Row 21 in my sheet is a row of binary flag that either equals 1 or 0 Row 35 is a row of input values...
  4. T

    Moving multiple records between worksheets

    I'm using the below to add data from a holding sheet(sheet2) to sheet1.The first record moves as planned. I need to run through all the records in sheet2 (not always the same number of rows) to sheet1. I've failed miserably with every "loop" "For...Next" etc. I've tried. I've only been able to...
  5. 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...
  6. Johnny Thunder

    VBA Help - Copy data from One Sheet to Another as a Loop - Excel 2016

    Hello, I am working on a project that will be looking at a datasource and trying to match up Model ID's onto another sheet in the same workbook and then copying over the Model Name if it finds the value. If not, it will look to the lastrow of the 2nd sheet and add the New Model ID and Model...
  7. P

    VBA Loop through named Ranges - Copy paste as values one after the other

    I have a workbook with several sheets that I have specified ranges for starting in A3 (same on every sheet) through column Q (row count varies). I have a sheet in the workbook that has all of the named ranges listed out in column A. I would like to write a macro that will look on sheets "Ranges"...
  8. H

    Looping an existing sub

    Hey everyone. I used a youtube video to modify a sub to help me track sent packages. It works perfectly for the first tracking number. However, I'm a little confused as to how to make the sub loop correctly down the "A" column to show results in the "C" and "D" columns. In the actual file, I...
  9. J

    Multiple Variable For Loop

    Hello, I've written thefollowing code to look at each cell in column C of Sheet2 that equals each cellin column C of Sheet1. Sheet1 values will show up multiple times in Sheet2, soI want it to loop until either there aren't any instances of the values matchingand column G being blank, or it...
  10. B

    extracting letters from words with variable length and adding a string to the extracted letters

    for example: can a word in a cell "star" be extracted into another cell as "s.mp3,t.mp3,a.mp3,r.mp3"? the words can be a of varied length .. the final output can be concatenated .. but the issue is that the words can be of any length .. example - "ant" or "butterfly" or "enlightenment" .. i...
  11. Spotycus

    Help with a VBA Loop with Nested If statement

    Hello, I have a very large excel sheet that uses a lot of VLookups Nested inside of If Statements and the calculation speed is horrible. Can someone help provide me a better way via VBA to accomplish the same goal? I recorded a Macro and added the formulas that are currently in the excel...
  12. B

    For Loop keep resetting itself after 58 iterations

    Hi I am having a problem i have never seen before and cannot work out why. I've searched for an answer but i've had no luck. I have a table of data 57 columns wide. Columns 1 to 8 contain information such as name and date etc. Columns 9 to 57 show "production" numbers; each column represents a...
  13. E

    Loop with two statements

    Hello everyone! I have got a excel file that looks the one below: Now I need a loop that check each cell in Column "H", if there is two cells in column "H" that matches each other (in this case Cell 1 and Cell 6). Check in Column "i" if there is any data in any of these cells, remove the cell...
  14. E

    How to add value to current cell,

    Hello People I have made following code. The code loop through all cells in a master file column "H" for each value(example H cell contains "Hello") , open a new file check if the value is equal to any of the cells in column "H"; if the value is equal(this case "Hello") take the value same row...
  15. E

    Instead of replace a number add.

    Hello people, The code does following: Loop through all Cells for every row in the Master file. for each cell open a Separate file Loop through all used cells in column in "H", If the cells are equal take the Cell same row Column "i"; paste it in the Master file to the same row as the first...
  16. C

    VBA for a multiple GoalSeek on three rows

    Hi all, That has to be dead simple but I can figure it out (a beginner!). I have three rows: 5, 12 and 19. my columns run from L to BM for all three lines. What I need is a loop that does this: Range("L5").GoalSeek Goal:=Range("L12").Value, ChangingCell:=Range("L19") .... but for the...
  17. D

    Filter and Replace Loop

    I have one sheet with a Vendor column that has non-exact matches. (e.g. Walmart #6511 vs. Walmart #1654). I want to make all of those nonexact matches the same (Turn the example values into just Walmart.) I was not able to find a way to directly remove the non-exact matches. This led me to...
  18. K

    Web Data Scraping from HTML Data Table

    Hello all! I posted a couple questions about an ongoing project a while back. With the help of people here, and some modifications to the code, I now have a code which signs into the website specified in a certain cell, using user input boxes for username and password. The code will skip this...
  19. B

    copying to adjacent cell

    Hi all, Is there a way to loop through a column(lets say A),where most of the cells are empty(size of the column will varying in length),but when the loop hits a cell that has data in(please see Fig1)the data is copied over to the adjacent cell in the next column.Any help appreciated:) Fig1...
  20. T

    Loop through array - looking up multiple columns

    <TBODY> Data_Tbl</SPAN></SPAN> Staff_ID</SPAN></SPAN> Department 1</SPAN></SPAN> Department 2</SPAN></SPAN> Department 3</SPAN></SPAN> City</SPAN></SPAN> Date Hired</SPAN></SPAN> Grade</SPAN></SPAN> Hotspot Level</SPAN></SPAN> ID1</SPAN> Marketing</SPAN> Analytics</SPAN> Core...

Some videos you may like

This Week's Hot Topics

Top