loop

  1. M

    Any other ways to loop without using VBA?

    Hi all, I have a set of fixed asset data where the categories the fixed asset are only showed at the end of each category (instead of the beginning). I would need to have the category to be in a new column beside every asset number. There are over 10,000 rows of asset and 20+ categories...
  2. I

    Adding IF statements to this VBA code

    Hello. I have this VBA code to change the values of cells in column D depending on what time are in the cells in column A. 6:15:00's are STG.A then increasing in sequential order number wise. STG.A01, STG.A02, etc. 6:45:00's are STG.B. 7:15:00's are STG.C. 7:45:00's are STG.D. 8:15:00's are...
  3. A

    Repeat Formula until it Returns zero [VBA]

    Hi. Is there a way to paste certain formula in column E until the formula returns a zero value? Column E don't have anything in it. So basically, I want to input a formula in E1, then input same formula in E2... and so forth.. until the formula return a zero value.
  4. I

    Looping vba code until all relevant data ends?

    Hello. I have this VBA code that identifies route codes in one sheet in a workbook (pickorder). Then in another workbook (CX) it identifies those same route codes and gets the value (times) in 1 row below and pastes it into column A in the first workbook (pickorder). The code works really well...
  5. M

    Excel VBA - needs to loop from Start Date to X days and print each date

    Hi Excel Pros and forum members... Thank you all in advance! I am looking for a solution to the following. I have two Sheets in my Book, Sheet1 and Sheet2. Sheet1 contains a list of people with a Begin date and number of days like so... A B C Name Begin Date Days Mike 1/1/2019 20...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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?
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

Some videos you may like

This Week's Hot Topics

Top