loop a macro

  1. P

    Counter in For Each loop

    I created a file which will calculate sales rep commission based on terms and conditions of the commission agreement. All sales rep performance data is filled in on one tab, and then through selections on drop down boxes, the file will generate the correct payout to be paid to relevant sales...
  2. S

    VBA: All combinations that sum between two numbers - too much processing blows up

    Hi, Thanks much in advance for reading. It's really not an overly confusing concept, and I've tried to lay it out as simply as possible! I have some VBA code (not my own) that successfully returns combination sums between a defined range. A quick summary of what that even means, then my issue...
  3. O

    FileCopy based on cell reference and loop

    I'm a novice at all of this and have no formal education in coding. I use google and do my best to cobble things together, but I've hit a wall which I will describe below. Thanks in advance for any help you can provide. I work as an academic advisor in higher education, and for each new...
  4. F

    VBA - Loop thru columns

    Hi All, I´m working in a spreadsheet where: Column B - Customer Name Column C - Status Column D to O - months of the year ( sum of amount spent by each customer by month) Columns P - Sum of total year expenditure Cell S1 --> Its a drop down list - containing all 12 months ( in the example its...
  5. P

    Adding Loop to a recorded macro

    Hi All, Need your all help to add Loop in this Code. I've list of 50+ clients for which I've to send reports every Month. I've tried coding for 2 clients and its working fine but I've to do it for 50+ Clients, also file name should be same as C1, C2.... C55 in TMP file which I've already done...
  6. T

    VBA to deal with row based on cell value then move to next row

    I have a sheet of data that needs each row to be dealt with a certain way. To assist with this I've added a helper column (U) which is a vlookup to a set of conditions. the cell value from U10 downwards returns a value 1-6. The formula gets pasted into column U, so the next blank cell (usually...
  7. C

    Find and replace from access to word

    Hi all just recently migrated to access still learning hoping somebody could point me in the right direction. So I have a table containing property serial number as well as location information for inventory purposes. What im Trying to do is figure out if theres a way to loop thru each...
  8. C

    Loop Though all worksheets in work book

    HI all i know I'm missing something very small but i'm lost, i have the below code that i need to loop though every worksheet in the workbook, but it only works on the worksheet i'm on what am i missing Please Sub Copy() Dim WB As Workbook Dim ws As Worksheet For Each ws In Worksheets...
  9. J

    VBA Macro search match twice 2 keywords same column and copy result to another sheet

    Hi internet peeps. I am stuck i don't know what code to use so i can search the same column twice for 2 different keyword and then copy data from the same row to another spreadsheet in sequence from a start cell. for details here's what i am trying to do 1. Limit the search within a range of...
  10. C

    Loop to Table of Contents is skipping rows

    Hello, I have a macro to loop through all of the sheets in my workbook and return those sheet names with hyperlinks and some more additional info to a "table of contents" sheet. But i have it skipping some of the sheets that I don't want included in the TOC. As a result, it is leaving blank...
  11. B

    Loop until blank

    Hello guys, hope you're doing good So my problem is i have a task at hand with complex features or codes. I found the codes seperately and every one works good but when I try to add them together the code does not work. I want to fill a template according to ce cells and print the template and...
  12. P

    Loop Causes Excel to Shutdown after 10-15 iterations.

    Hello! I've been running into an issue with a loop macro that after about 18 iterations it just shuts down. I have it Calculating a couple of times so that the values update correctly. One of things being updated is a dynamic named range that was made with indirect(). What can I do to clean...
  13. V

    VBA Loop that sends emails via Outlook with a PDF attachment is being considered "spam"

    Hello, I have a pivot table in Excel. I created a loop that selects 1 filter of the pivot table. For each loop it creates a PDF on my desktop, then takes it as an attachment, sends an email in outlook, deletes the PDF, then goes to the next filter on the pivot table. Its probably sending 300...
  14. R

    Running macro through files in different locations?

    I hope someone can help with this: Is there a way I can get the same macro to run for about 25areas in separate subfolders? ...\Area1\list.xlsm then ...\Area2\list.xlsm .... either by listing the "list" files and paths in VBA and looping through, or by another more efficient method? (Areas...
  15. S

    Reduce time taken for VBA loop

    My VBA code currently loops for 5,000 iterations and takes about 25 minutes to collect the output data in the Output excel sheet. Is there a way to reduce the time taken for instance by improving the copying and pasting of values, collecting the output data in some kind of array etc.? Given that...
  16. V

    Macro To Extract Data

    I have a workbook that houses detailed metrics by project. In the front of the work is a summary tab with subsequent worksheets for the individual projects. I want to write a macro that will extract information from the individual project worksheets into the summary tab. Example: Row 1...
  17. R

    Loop not working/crashing

    Hello everyone! I am a pretty beginner vba user and having some trouble getting a loop to work. I have a pretty extensive formatting code here, which works perfectly on a single worksheet. When I then try to have it loop through every single worksheet in the workbook except for the "Original"...
  18. D

    Excel Ninjas: Loop Copy/Paste Category Types at Row Level

    Hello, I am trying to create a macro that does the following: Loop down sheet and copy the Description (Column E) Ex: Copy "Cash in Bank" [Note: the empty cells at the category description level (Beg and End)] Paste the description in (Column L) next to each transaction Ex: Paste "Cash in...
  19. D

    Writing txt. logs during a loop

    Need the following code to produce a txt. log on an error, but return the loop interger it was using when the error occured, then retunr to the loop. Sub email() Dim OutApp As Object, OutMail As Object Dim strbody As String Dim cell As Range Set cell = Range("J1") For i = 1 To cell.Value...
  20. C

    Barcode Scanner Macro

    I'd like to setup some sort of a macro in excel with a barcode scanner I have. We have a factory with a large number of machines which are all bar coded that also have travelers with the production order in a barcode format. Right now someone walks the line and manually writes which work order...

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