loop

  1. M

    Looping code pasting onto same line

    New to excel/vba, not too familiar with coding, & many other generic openers you've seen. I'm using a loop to copy an entire row to another sheet if a criteria is met but my code keeps pasting the data into the same row, overwriting the previous entry. Not sure if the EntireRow.Delete argument...
  2. X

    How to loop through excel sheets in same directory and copy all sheets into a single workbook?

    How would I create a macro that loops through all the excels sheets in a directory and copy all the sheets in a new workbook?
  3. B

    Xlookup VBA

    Hi, Please help me i'm only a beginner in VbA. I got a lot of names in cell B more than 60 names and 31 rows for date. BTW this is for a leave tracker. My code is For x = 5 to 55 Cells(x, 3) = application.evaluate("=xlookup(B&C2,NAME&DATE,LEAVE,"" "")") Cells(x, 4) =...
  4. Q

    Loop and Extract data from 2 worksheets with varying rows of data

    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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

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