loop

  1. Q

    VBA: Populate Data from Multiple Worksheets

    Need help to create a macro to extract the following data (highlighted in green) from Multiple Worksheets onto the Summary sheet: Month of Report onto E1 Date of Report onto E2 Carpark ID on column D Carpark ID + Lane ID onto column E Percentages for Hourly, Season Parking and Total on column...
  2. Q

    Find Worksheet based on Value

    I have a raw data report with up to 100 worksheets. There are a few worksheets that contains "No records found" showing on cell A4. Is there a VBA code that can loop through all the worksheets and make the first occurrence of "no record found" worksheet active? I have tried more than 10...
  3. J

    Lookup and merge vba code

    Hi brains trust I’m struggling to develop some code that I’m hoping someone here could help with please… I have a spreadsheet of books and their data in columns A-AZ I have 20 different book genres in column F I have 200 book titles in column P Each book title has its own row (therefore...
  4. R

    Adding additional information to every nth row from start reference, copying same instance of rows

    I've got code here that will bring in information while looping through workbooks in a folder. It could be 5 workbooks or 50. Usually on the higher end. I'm bringing in 5 rows of information so every time i open a new workbook for information, i need it to go down to the 5th row and start again...
  5. E

    Macro to Loop and Run Based on File Name

    I have a main folder on my desktop, lets call it 'C:\Users\Desktop\Update'. Within that folder I have 3 additional folder lets call them 'FY21', 'FY22' and 'FY23'. Within each of those subfolders there are 5 XLSX files. I have created a code for each file based on the subfolder they are in. I am...
  6. S

    VBA: Nested counter within formula

    What I am trying to accomplish is increment my CONCATENATE formula by one. My issue however is that this is already located within a counter that applies the formula to every other row. I have tried to include detailed comments in my VBA code to follow what everything does. In short, in the...
  7. M

    For next loop is not working

    Hi guys, I'm trying to use for next loop, on button click it should check the value from the cell R2, and according to the value of the cell to show the next value from the list in column O in label. Bellow you can find the loop which I used, but it's showing the value from the list in column...
  8. Richard1982

    (Not so) Simple VBA Loop

    Hello, Really hoping someone can help me because I'm puling out my hair trying to solve this and getting no where fast. I have a PivotTable and one of the filters is for 'Vendor Name'. I can select a vendor then click a button I made and it fires them off an e-mail full of details which have...
  9. A

    Stuck in an error Loop

    Hello All, I tried to do a loop that would write an entry to an error log sheet in the event a folder couldn't be created or already existed, but I haven't done it well, and continue to endlessly generate errors. If someone has any insight into where I went wrong, or suggestions on a more...
  10. A

    Looping a MkDir function

    Hello all, I am trying to create a batch of folders where the code is normally quite simple: MkDir[D3&E3] I have several hundred that I regularly make. So far, I just have the same line repeated, but I'm trying to do some sort of loop or check to look for values in a column, and if present...
  11. R

    Prevent creating duplicate worksheets in a loop (VBA)

    Hello, I have VBA code with an inputbox where you can enter specific years in order to create worksheets containing the months of this year. Now, if the year is entered twice, then the sub should be exited with the messagebox "This year has already been entered". Anyone has the VBA knowledge...
  12. J

    Use VBA to get step polylines from Google Directions API xml file

    Hi all, I currently use VBA to extract the 'overview polyline' returned from the Google Directions API, and paste it into a spreadsheet. However, I need more accurate polylines. I can get better accuracy if I can stitch together the child node polylines within each step. How do I convert my...
  13. V

    Loop Through Sequential Variables for UDF

    Hi all. I am trying to see if it is possible to loop through a series of variables with a standard naming convention. I am using this to create a UDF for me to use. What I am hoping to achieve is something like this where I can choose to enter up to a certain number of ranges as arguments for...
  14. A

    Excel VBA: Loop through autofilter criteria to copy and paste to new sheet then save as new file.

    Hi all, I want to loop through autofilter criteria in column G( below photo) to copy and paste to new sheet then save as new file. Below is my code, i know that it can use if and else to do, i want to know how to change to use the loop. Thank you very much for your help. Dim wb As Workbook...
  15. F

    Tricky VBA Loop Through Excel Table Range and Change Total Column Formula

    All, I have a tricky VBA Code Scenario. I'm trying to define a table range then loop through all columns in said table range and change the formula in the total row of the table. The Tricky Part is my Table Self Updates so the number of columns and the label of the columns change depending...
  16. E

    Loop trough two ranges

    I need help in looping the code below trough my named range or just skip blank rows. Below code works fine until it should skip rows which should not contain textbox value. My textboxes for this code starts at 58 and runs trough 66. But the value from theese textboxes should be pasted to cells...
  17. S

    Looping through worksheets not working

    I have the code below and seems pretty standard but it only runs for 1 worksheet and doesnt loop through them all. Cant figure out whats worng Sub formatdata2() Dim keepcolumn As Variant Dim fnd As Variant Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets 'Cells(1, 1).Select...
  18. Johnny Thunder

    VBA Help - Scanning two Columns for string based on lookup table

    Hello All, I am working on a project and was hoping for some help on the final piece of this puzzle. I have a sheet Source that has two columns W or X that could contain a possible string of text that if its found I would like to place a value in column AL. I have a small lookup table on a...
  19. C

    Using different range to sort numerous columns with different row lengths

    I am using this snippet from recorder. Columns("O:O").Select Dim SortO As Long SortO = Range("O" & Rows.Count).End(xlUp).Row ActiveWorkbook.Worksheets("data").Sort.SortFields.Clear ActiveWorkbook.Worksheets("data").Sort.SortFields.Add2 Key:=Range("O2:O" & SortO) _ ...
  20. E

    VBA Loop for inserting data

    Hi all, I have raw data that I want to convert to be read easier. There are lines open between each statement. 1. I would need the payment date(M67) to be pasted in every row in column K(In photo - K75 and K76) for the transactions 2. I would need the Internal code(C68) and code(C69) to be...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top