loop a macro

  1. Z

    Loop to copy each row and paste to a new tab 4 times

    I am trying to write a macro to copy each line from columns A to E and paste each row 3 times on another tab. I need this macro to loop through until it hits a blank row. Here is code that I recorded, but I do not know how to make this into a loop. I also have a piece of code that grabs F to I...
  2. D

    Compile error: Expected: To

    Hi - I'm a novice user running into a problem I've spent a few days trying to correct. I'm using the following code to run through a worksheet and if the there is data in a cell in column O I need to clear contents of the corresponding cell in column H but I keep getting a compile error... the...
  3. Nayasoch

    How to repeatedly change the value of a Cell and export each Graph to External Folder

    Hello Everyone, I am looking for solution to change a value of one cell from 1 to 100,( which directly link to column source of Graph Data ) with step of 1.00 each time and export each Graph i.e Total 100 in External Folder so that I could compare them and compiled them to make a Gif to show...
  4. CatyH

    Make macro that will pdf, iteratively, from dropdown

    3 tabs involved: 1. Dashboard - displays graph and text dynamically filled upon selection of DataValidation list in cell C1 (on Dashboard). 2. Calc - where the data on Dashboard pulls from. It's an intermediate manipulation of the data that is entered in the 'Enter Local Program Data' tab 3...
  5. Nayasoch

    Loop the Code untill cetain value exceeds

    Hello Everyone , I have this code Worksheets("Graph5").Range("G1").FormulaR1C1 = "0.01" Worksheets("Graph5").Range("I1:J1").Select Selection.Copy Worksheets("Graph5").Range("L1:M1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _...
  6. Nayasoch

    Loop a single cell value untill a certain value

    Hello Everyone: I have certain value in A1 and will obtain result in another cell. I have to insert no from 1-100 serially in A1 to get results and paste in separate column , any VBA code I'd highly appreciate.
  7. 1

    Copy & Looping VBA code

    Hi, I have a workbook with other 100 sheets. Each sheet is identical; consists of 2 columns with the 2nd column to be copied and transposed into a mastersheet. I have created the macro to copy & transpose but cannot get the loop or repeat instruction correct. From reading many threads and other...
  8. T

    Multiple Replace over Range of Cells

    So I'm tasked with taking one column in an Excel spreadsheet and converting those values into Latex (TeX) format and placing the formatted values in another column. For example, if I have CS3# in column A3 then I need to replace that with CS3/hash in column B3. Some symbols may contain more...
  9. S

    Macro Code to run in continuously for 105 times

    Hi Team, I am pretty novice in vba coding and trying to learn in by recording macros. I have come across a situation where macro recording is failing to fetch me the outcome. Scenario: I have data say in Sheet1 in column A,B & C. Now I want the data of A1,B1,C1, to be pasted in Sheet2 cell C3...
  10. J

    optimizing vba looping code

    Sub Testingloop() Dim endrown As String Dim ex As String Dim ez As String Dim eh As String Dim eg As String Dim el As String Dim ee As String Dim es As String Dim ef As String Dim ei As String Dim i As Integer Dim LastRowColumnA As Long: LastRowColumnA = Sheets("looping").Cells(Rows.Count...
  11. M

    VBA Loop with Hidden Rows

    Hello all, New to the community and VBA and I'm having some difficulty figuring this out. If anyone can provide some help I would greatly appreciate it. I have a loop and I need rows that are hidden or filtered out to be skipped. Everything is running fine but rows that are hidden or filtered...
  12. R

    Loop A Macro

    Dear All, I have an excel data with date, source and SR number. In some cells of date and source is blank, in these case I need to copy the data of above cells and also needs to repeat the same until the SR number becomes blank. Table given below. Thanks in advance. <tbody> Date Source SR_No...
  13. M

    VBA to copy, paste, update value and loop

    Hello I am fairly new to VBA and have been playing around with a few different things for the last few days while tryng to accomplish the following: I would like to: 1) copy from cell b3:b6 2) paste it in sheet2 in cell a5 3) (back on sheet1) copy cell D3 4) paste on sheet2 in cell A3 5) (back...
  14. J

    Loop Counting - Stop and Start based on a blank row

    I would like to loop count different sets of data. They are separated by a blank. Here is the VBA i have for counting but I want to make it loop for each data set. Sub RowCount() Dim countnonblank As Integer, myRange As Range Set myRange = Columns("A:A") countnonblank =...
  15. A

    Can someone help me loop this macro to each tab?

    I want to run this macro for each tab. It sorts the same range A5:H48 on each tab. It is sorted by date range oldest to newest in column A. Help! Thank you. Sub LoopTabSort() ' ' LoopTabSort Macro ' Sorts same range A5:H48 on each tab. Cell sorted by date range oldest to newest in column A '...
  16. M

    Loop through cells and copy if condition is met

    Hi, I am new to VBA, and have searched the forum a lot, but I couldn't find a solution that exactly matches what my code requires. What I basically want to do, is to loop through a lot of cells in a column, and if a condition is met, I want to copy the two cells next to it in to another sheet...
  17. J

    VBA Excel SendKeys in Loop is not Working

    I have some problems with this code below, It's not doing what I expect I want this code to active an add in to update my main sheet and then goes to the next sheet and update also using the same key combination until page 6, What I get is that first goes to the page 6 and then performs the...
  18. J

    copy & paste using looping

    Sub dataloop() Lastrow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row For i = 4 To Lastrow If Cells(i, 3) = "Pass" Then ActiveCell.Offset(-4).Copy ActiveCell.Offset(2, -2).PasteSpecial End If Next i End Sub I am trying to use looping to copy and paste the value where C= Pass, then go...
  19. J

    Filter and delete criteria with loop

    Sub GatherInfoHimchanLooping() Dim exclude As String Dim endrow As String: endrow = Sheets("Info").Range("E100").End(xlUp).Row Dim Finalrow As String: Finalrow = Sheets("Info").Range("I100").End(xlUp).Row For i = 24 To endrow exclude = Cells(i, 5).Value Sheets("Data").Select...
  20. C

    Loop through list of ranges with numbers in the names (VBA)

    Hi, Long time lurker first time poster here. I have been doing some basic work with vba to aid in some of my regular excel tasks. This one is where I rollover a previous months file ready for input with the next month's data. What I am doing is copying the "current month's data" into the...

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