loop

  1. D

    Loop VBA and increase values in the code

    Hi there, it has been a few years since I last posted. Is there a way that I can loop the following code 27 times, and each time it loops I want to increment every instance of DirectDebit in the code, i.e. DirectDebit01, DirectDebit 01n etc - loop - DirectDebit02, DirectDebit 02n etc - loop -...
  2. J

    A loop counter

    Hello. I am working on a workbook that uses random numbers that loops until a certain condition is met; a specific number. I am wanting to be able to count how many times the loop has to cycle until the number is calculated correctly. Essentially a counter of the cycles. Any help is appreciated.
  3. T

    Maybe a loop?

    Hi everyone, I was wondering if there was a way that i would be able to add up some numbers based on whether or not there was a letter in the cell below the cell i want to include. Currently i have a range of numbers but i need to be able to mark them in some way if they are above or below the...
  4. V

    Loop required for a macro

    Hi, Please check the following macro code and advice how can we run it in loop, Sub Loop() ' ' Loop Macro ' Range("D2:D8").Select Selection.Copy Range("E8").Select ActiveSheet.Paste Application.CutCopyMode = False Range("F2:F8").Select Selection.Copy...
  5. Z

    VBA if ReadOnly Loop

    Hi All, Hoping someone can help me with this. I have some code that will open another Workbook, add data, save/close. I’m trying to create a loop that will check if the file is opened read only, if the file is opened read only, if like it to close the file and try to open it again, after 5...
  6. G

    VBA Select Range and Move based on conditions

    Hi All, I am looking for some help on VBA to Select Range and Move based on conditions. I would like to move all the contents between "Project A" and "Project B" one column to the right. Same with all contents between Project B and end of table which will also move 1 column to the right. This...
  7. A

    Loop through empty cells and data move to one cell left

    Hi All, Loop through empty cells and data move to one cell left <tbody> Date 11/6/2019 Normal 28035 Y NO Date 11/6/2019 Normal 28035 Y NO Date 11/6/2019 Normal 28035 Y NO Date 11/6/2019 Normal 28035 Y NO Date 11/6/2019 Normal 28035 Y NO Date 11/6/2019 Normal 28035 Y NO Date...
  8. D

    loop column with VBA, tell you how many times it appears

    i want a macro that loops through column F and then tells you if it appears more than twice and highlight those cells.
  9. O

    loop through specific sheets and copy entire row into one master sheet if data is in column

    Dear VBA wizards, Can someone please help me – I have been going through this for a while I have about 25 sheets in total in an excel file of which 10 sheets (one tab is called is AGV, one other tab is AGR etc) has some data and I would like to copy the entire row in each of these sheets if...
  10. T

    Loop with values in Column D in Sheet 2 to find Values anywhere on Sheet 3 and Paste to adjacent Cell E in Sheet 1

    Hi dear Members, The syntax for creating a loop to use values in Column D in Sheet 2 to find Values anywhere on Sheet 3 and Paste to adjacent Cell E in Sheet 1 eludes me. Could anyone point me in the right direction, please?:confused: Thanks
  11. N

    Help with VBA!

    Good day to all, As I’m fairly new in VBA.. Appreciate if you could help me on this! So I have this excel workbook with a set of raw data (workbook1) which i wanna automate to import/copy&paste the data to another workbook (to open workbook2 with dialogbox). Eg: Cell (A1:J1) (Workbook1) copy...
  12. T

    Boolean set first cell check if data then got to next cell

    Hello, I would like to find the code to set a start cell to check if there is a number in it, if not check next cell in the row? Example sometimes the source data is in BL3 and others its BK3. so if I can set a short loop it might solve an issue. ws2.Range("A1").Value = ws1.Range("BL3").Value...
  13. J

    Bookmarks in a word document

    Hi There! I have two columns of data, one that has a list of bookmarks and another with corresponding data in a workbook. I need to write a macro that looks at the data column, assesses to see if it blank. If it is not blank, it needs to look at the bookmark name and put the data into the...
  14. G

    Pulling Data from website using VBA

    Im pretty new to VBA coding and searching on online and youtube hasnt yielded much help, as they all have their own way to do it and its been very confusing. I can do this via "Data > Get External Data > From Web" but its pulls in way more then what I need, as it picks the whole page and not...
  15. B

    Faster way to loop

    I would like to know if there is a faster way for a loop to run. Here is what i have now and it is slow. Dim rng As Range Dim lColorCounter As Long Dim rngCell As Range Set rng = Sheets("MASTER LINE LIST").Range("C2:Z2000") lColorCounter = 0 For Each rngCell In rng...
  16. D

    creating multiple PDFs by looping through number list

    The code below is part of a macro being used to create a list of numbers and then loop through those numbers one at a time, place the number into cell I1 which is linked to numerous other sheets. Each of those sheets has a formula in cell Z1 that sets to "Yes" or "No" depending on if the...
  17. 0

    Loop & R1C1 Formula: variable reference problem

    Hello everyone, I need to fill a tables with certain formulas, and so far I used the following approach: Range("E6").FormulaR1C1 = _ "=FORECAST.LINEAR(RC[-2], OFFSET(INDIRECT(""[Flight_A.xlsx]""&R5C5&""!$N$2:$N$70""), MATCH(RC[-2],INDIRECT(""[Flight_A.xlsx]""&R5C5&""!$AL$2:$AL$70"")...
  18. J

    VBA Loop every 200 milliseconds

    Hi all Im trying to loop a macro every 200 milliseconds but am having trouble, just wondered if anyone could help. Here is my code Sub Refresh() Worksheets("Main Data").Range("AJ5:AJ11").Value = Worksheets("Main Data").Range("AI5:AI11").Value Worksheets("Main Data").Range("AI5:AI11").Value =...
  19. S

    Conditional hiding of many text boxes

    Hi all, I have very little coding expertise and have searched the web and the forum, but couldn't quite find the solution. I am trying to show/hide hundreds of text boxes based on their values. Use case: I have an image of a map (jpg), which includes 222 locations. Each of these locations has...
  20. LocalNeko

    VBA - Consolidate Data and place the new data at the end of the main sheet

    Hello All, I'm new in the macro space and I'm pretty sure this question has been asked before. But I have multiple worksheets (12 in total). That need to all be gathered in a single sheet. Now, I'm able to consolidate the files it's just that my problem is that the placing of each sheet is...

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...
Top