vba loop

  1. 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...
  2. 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"...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. N

    VBA Loop for each to build forecast

    I have a data set that includes Column1 (Dates, week-to-week starting on Mondays), Column2 (product by SKU), Columns3 (product status, active... this will eventually be left out as soon as I finish the VBA to permit a list to be built allowing only active products to be selected in the data...
  17. M

    VBA loop through one column then pass next

    Hi Everybody, I have created a code that goes through all rows of a column and apply some conditions and create values in other columns, vode works fine but i want code to loop through other columns, see my code below here i loop through column C but after column C is done i want to apply same...
  18. S

    VBA code help

    Hello, I'm hoping someone can help me out with this code. I'm new to VBA and trying to figure it out. I got the code to work for the first cell to copy down column A but can't get it to do the same for the next column of data. Any help is greatly appreciated. Here is my code, I've highlighted...
  19. B

    VBA to right align text if the first characters are " "

    I have data in column A that I would like align right if =(LEFT($A10,4)=" ") is true. Is there a way with VBA to run through all of the rows in column A and apply the align right to all the cells that are true? Thanks for your help!
  20. B

    VBA: to bold text if the text starts with" ["

    I'm trying to create a macro that will bold all text on a row if the text in column A starts with " [" then move down to the next row and repeat. Any suggestions? Example: Column A Column B Column C [501650 Dues] 123 456 Billboard...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top