loop

  1. S

    Find and Replace Across Specific Sheets based on a Data set with correct names

    I have a list of correct and incorrect names as seen in sample file below. I am trying to loop through a list of sheets and do a find and replace for each item on the List. The Correct Name is what the replace is going to be and the Incorrect Name is the find. I have looped through specific...
  2. B

    Dynamically Create and Fill Value of Userform Textbox in VBA

    Hi Community, I am stuck in a VBA conundrum. I am trying to create multiple UserForm Textboxes in vba and Fill each one with a unique value either by index, or by some other means. I am able to get them to fill but when I do it seems that all the text boxes are being filled with the same values...
  3. A

    How to Move to Next Row, start over, unless blank

    Hi, I've written a macro to take an employee database Sheets("CEP Program"); copy a row representing a single employee & their information to a source sheets("Source Data") and then use the values in Source Data to fill a form in Sheets("Verification Sheet"), and print the Verification sheet...
  4. K

    VBA Break Link Loop not working

    We are using a script to open all files in a folder, breaks links and save the file into a new location. There are over 50 files in the folder that the script works on perfectly. We have about 10 files that are causing heartburn. The vba returns an error on this section of code: For Each...
  5. W

    VBA copy and paste to new sheet based on number of rows

    Hi, I am making a workbook to log all data based on coffee roast profiles sold. Sales sheet has the following which I want to copy to log sheet. B2 = sales ID B4 = name (either company or person) Then I can have data from D11 all the way to F20, and that's where I am finding difficulties, I...
  6. T

    Filter loop through macro

    I have various workbooks that I need to check the data in by filtering on various columns to find those that need to be checked and then I filter through the resultant list using usually column 'C', checking line by line and marking those 'done'. What I'd like to achieve is a button that...
  7. J

    Repeating VBA code for multiple Sheet names and References

    Hi All, I'm hoping I can get help with the below code, repeating it for a number of sheets. I am downloading data from a sharepoint, and pasting it into the relevant named sheet, for example retrieve data from X and paste in X_Sheet. I want to do the above multiple times with a loop, possible...
  8. M

    VBA to Open/Save/Close Multiple Excel Files

    Hi all, I need some code that will loop through a folder of 300 excel files.........I need the code to open each file (which enables some updates), then save it, and then close it. The format of the files is xlsm. Probably a simple one for some of you folk Can anyone help?
  9. G

    Transpose every X rows to columns (Automation)

    Hello, I would like to transpose a range of data (A1 to KJ1) from every second row (row 1, row 3, row 5, until the last row) under one single column (e.g. column C) in the same sheet. I am having difficulty creating a macro with a loop that will help me do this. I tried following some...
  10. J

    Find closest values

    Hi, I'm new to macros and can't find a good starting point for my problem. I want to loop through a row in a table looking for the 3 closest numbers (column D) to a value in a given cell (N5) and set the corresponding row to "yes" in column B. So if the 3 closest values is found in D3, D6 and...
  11. C

    VBA / Macro Copy, Paste, Loop

    Hi All A little help please for a complete VBA / Macro novice. I am trying to automate the coping of data from one sheet to another whereby the macro I have takes all the data in the first data row (row 2) of sheet 1 ("Standard report - Items"), copies this to a new sheet, then selectively...
  12. F

    Fill Uneven Records Across Columns

    Hi All, Could you please help me find a way to fill in the blank cells that should start from the LastRow + 1 in Col B and go until LastRow in Col C? At the moment the data is just being pasted over the lastrow in Col B. Loop in question is the last one, rest is just used to show more or less...
  13. R

    Conditional Format Loop

    This is part of a larger macro to update several workbooks. Some Worksheet names have numbers only and some letters only. I cannot figure out how to loop through each worksheet named with numbers and update the conditional formatting below. Sub test2() Dim sht As Worksheet 'ADD...
  14. S

    Occasional runtime 1004 error

    Hi Folks, I'm running the below code...and it works fine...some of the time. Other times I get a runtime error but I can't figure out how to resolve it; any tips? The bit where I get an error is; For Each shp In ActiveSheet.Shapes If Not Intersect(Range(shp.TopLeftCell...
  15. D

    VBA - Loop files in folder, search column for keyword, copy range of text to spreadsheet

    Hello everyone, I'm trying to create a VBA program that will do the following steps 1. Loop through excel files in specified folder 2. Go through each file 3. Search in column B for "INTL" and/or "TRAX" 4. If "INTL" is found in column B, select that cell, move one cell over to column C, and...
  16. E

    VBA - Help with LOOPs - copying range to another worksheet's next available row

    I am looking for some assistance making the code below run for all selected cells in rows 27-67. The code below works for the first row; it copies contents from the selected cells to the next available row on a different worksheet.How can I make it loop through rows 27-67, copying cells from...
  17. J

    Loop through an array and get a value

    Hello everyone, I am trying to run the below code in order to loop through a few arrays and get the first value in each array, but, unfortunately it is not working. The message box should display the values: "1", "4" and "7". Thanks. Dim allArrays As Variant, myArray1 As Variant, myArray2...
  18. K

    New Input Every Loop

    I have some code that allows a user to select multiple items from a list box and clear them out from the list. I'm trying to add a feature to allow the user to input comments for each entry if desired however the issue that I'm running into is that it will only ask for input once then it exits...
  19. C

    Activate a sheet in a sub that is defined Within another sub

    Hey Guys, I am trying to create a code that does multiple filters and copies data depending on items from a sheet. There are two sheets; one IPSWB where it contains the Parts to be filtered, and the other is ACSWB where the logic is derived from for filtering. My Issue arises when I need to...
  20. M

    Create Named Range From Values in Adjacent Cells

    Hello, I am trying to create a series of several named ranges in a single column that are defined by the values in previous columns using VBA. For example, I have one column for "colors" and another for "shades". The third column is their product numbers. I would like to group the product...

Some videos you may like

This Week's Hot Topics

Top