loop a macro

  1. M

    Delete row in Book 2 depending on value of cell B4 in Book 1 - VBA

    Hi I need to write code which loops and deletes rows in a workbook (let's call it Book 2), if the name of a row in column A in Book 2 is the same as the name of cell B4 in Book 1. Please find below some sample data. For Book 1, the name in cell B4 is "Coffee" in this example (but it could...
  2. D

    VBA LOOP Help

    Hi all, I have a repetitive process that I am trying to automate which consists of the following steps: 1) Take 5 pieces of data from a record on worksheet A with 200 records and input those pieces of data into worksheet B 2) Take Worksheet B and save the tab as a PDF in a new location 3) Name...
  3. R

    List Boxes Font Size

    I have 42 list boxes. When the file is opened on a different PC and then i reopen it on mine the font shrinks. Is there a way to loop through all 42 boxes when the file is opened and set the all to font size 24?
  4. T

    open a txt file, edit it, then save it as an xlsx, then repeat for 200 additional files in the same folder

    The below code works great... for ONE file. But the files are from 1800.txt to 2000.txt. How do I insert this into a loop so I don't have to enter a filename? It just opens every txt file in that folder, parses it, then saves it as the same name but as an xlxs file? Again, C:\temp\ contains 200...
  5. M

    Loop through sheets with Call macro's

    Hello, I'm trying to make this code work for all my sheets. But after trying for several hours I give up. The problem seems to be that the code doesn't loop through the sheets. Sub NaDataInvoegen() Application.ScreenUpdating = False Call VerwijderMonstervoorbewerking1 Call...
  6. D

    VBA Code for BOM

    <tbody> Sr No Level Item ID Revision Description Ext Qty UoM Cost Extended Cost Make/Buy </tbody> So I have these columns in my PBoM sheet. I want to write a code using if and loop statements. Criteria is that if there is a Make in Column (Make/Buy) then it should add all the extended...
  7. N

    Dynamic Loop + Dynamic range to sum

    Thank you for reading my post, I am new to VBA and macros... I am having difficulty trying to solve the loop and dynamic sum value As you can see I would like to have sum the values in blue and have the total in orange but I am having trouble to sum it up at the macro since it is a dynamic...
  8. M

    Need a way to repeat a step x amount of times in VBA - Loop

    Hi, I have a spreadsheet which has a sheet which contains formulas (called 'Formulas') which are based from an input sheet. There will be a variable number of lines within this sheet based on the data in the input sheet. At the min I have a macro which takes the information on my formulas...
  9. A

    Looping Macro That Changes The Value Of A Cell Based On Another Cell

    Hi experts, I have a spreadsheet that needs a rather complex macro solution, for someone like myself at least. I will try to explain as simple as I can and provide as much clarity as possible (please see the file in this provided link as you go over the below inquiry) Goal: Elimination Of...
  10. S

    Help with inserting image into email body using .HTMLBody

    I have been held up by a simple glitch in my email loop code. I can't seem to get the correct code to insert a image into the body using .HTMLBody. I am using a loop to grab email addresses (both .To and .CC), salutations, attachments and the image that I would like inserted into the body of...
  11. B

    Apply Conditional Formatting to all Worksheets

    I have a workbook that I generate each day from my company. I need to highlight any cells less than 0 in Red. I recorded the macro to do this on one page but when I added in the loop it only works for the sheet I am on and will not go to the next. The data on each sheet changes so I cant select...
  12. V

    VBA Fast Convert # to Text add ' Before Number

    Programmers, I REALLY need your your Help speeding up some code. In one worksheet a table has 70,000 rows. In column "Q" (17), 40,000 cells have numbers; 30,000 are empty rows. I need to convert these numbers into text by adding a single quote (') before each number. My code sorts the table...
  13. K

    VBA - Print to PDF with file name from a cell

    Dear All I am new to VBA. I have the below code which is a printing loop to a specific number specified in Cell A2. Sub PrintLeveCal()' ' PrintLeveCal Macro ' ' Emp = 1 Do While Emp <= Sheets("Invoice").Range("A2").Value Sheets("Invoice").Select Range("A1").Value = Emp...
  14. A

    Needing HELP with VBA Loop for multiple segments of rows

    I have a subset of data that I am writing a MACRO to pull out into a different spreadsheet. Within this subset of data I have comparative numerical values in 9 of the 15 columns (E2:M2). I need to be able to highlight or isolate the greatest value in each row, but while also putting this on a...
  15. J

    VBA Copy & Paste Vertical Range Every X Number of Rows

    Hello! I have a spreadsheet with formulas in range D3:D18. I would like to paste these formulas (,Paste:=xlPasteFormulas) skipping one row in between each paste. For example: I would like to copy the formulas in range D3:D18 to D:20:D35, D:37-D:52 all the way down column D (with the last...
  16. M

    Repeat 1 cell as many times as there are entries in another column

    Hello! My ultimate goal is to pull 3 types of information from n number of worksheets into a summary page. I was successful with copying and pasting unique values (see below), however, I am having issues copying one cell from each worksheet and having it repeat multiple times. I have multiple...
  17. A

    Why will my loop not move through different worksheets (tabs)

    I have two different workbooks that I am utilizing for this macro. 1.) "zAward Template - Test - Copy" 2.) Appendix A I have written a macro that essentially takes the data I need in the template file from a tab and paste what is necessary to populate the appendix, does lookups to data, saves...
  18. R

    Looping userform ComboBox 1-10 with associated TextBox 1-10

    I can loop through all 10 ComboBoxes with the following code. [Code] Dim cmb As combobox, i As Integer For i = 1 To 10 Set cmb = Me.Controls.Item("ComboBox" & i) MyPNum = cmb.Value Cells.Find(What:=MyPNum, After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart...
  19. S

    Bloomberg formula refresh

    Hi Fellow Excel Mates, Hope you are doing good. I am trying to automate a Bloomberg refresh process but seem to get stuck with a event i.e Bloomberg data refresh. the whole process is broken into 3 parts which runs in loop. a. copies ticker from database b. refresh Bloomberg c. run a analysis...
  20. A

    VBA Solver for multiple rows? HELP

    Need a code to solve the same function down multiple rows of data. I have the following but it does not seem to work. The formulas are set to change automatically and update frequently. I would like to learn how to continually loop the code to perform the same iteration up and down the rows with...

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