do until loop

  1. A

    Extend columns in a do until loop

    I have written this code which draws data from a sheet to another with a do until loop but it does it only for 1 column (column U, the 21st column). I want to be able to perform this for 5 columns (columns U, V,W,X,Y). How should I change my code? Sub DrawData() Dim x As Integer x = 1 Do...
  2. Z

    Nested Web Scraping Breaks My Do Loop

    I am having trouble with a nested web scraping section breaking my Do Until Loop. I have a list that I am creating a unique file with two tabs. One contains some basic header information which I want to use to get the most relevant website and add the link. Then save, close and move on to the...
  3. A

    Do Until Loop Deletes and Creates New Sheet Instead of Skipping

    Hi all, I am revamping some code that aggregates data from several tabs of a workbook and copies them to another file, which is used as a link file in an Access Database. When the code goes into a Do Until loop, it processes the data fine, unless there is a blank tab and then a final tab with...
  4. M

    Do Until Question

    I have a Do until statement wrapped in an If statement and this is the Do until code I am using: DEPI = Sheets("MTN").Range("A1").End(xlDown).row Set findrange = Sheets("MTN").Range("A1:A" & DEPI) Set foundcell = findrange.Find(What:=Sheets("MTN").Range("C1").Value, LookIn:=xlValues...
  5. K

    Do Until Find a new value

    Hello, I have a table where in column A there are a set of data of all kinds. In some cells of this column there is the information that interest me, that comes in the form "account - xxxx"/ then a few rows below I'll find "account - yyyy", then "account - zzzz" and so on. xxxx, yyyy, zzzz...
  6. A

    Excel vba loop through list until

    Hello, I am trying to work on a way to automatically fill in a schedule for where someone should be. What I have so far is in my 1st sheet I have a table of cells I want to fill, across the columns i have dates, and down the rows I have the locations. In my 2nd sheet I have the dates of when...
  7. 3

    Please help! Looping for a product until a row is empty

    Hey Folks, Long time reader, first time poster. I'm trying to have my code enter a formula in T8 (and T9, T10, etc.) until there is no longer a value in cell in row 8. It is based off another format so I need it to start on cell T8 so it doesn't pick up the headers (hence me trying to...
  8. A

    Autocompleting a Sheet based on one row of information

    Hi All, I have a tab (scheduled days to work) where I put in a persons name and what days of the week they say they want to work. What i want to do is once the data is put in like the first table below a button is pressed and it will automatically populate a whole new tab for the times they...
  9. C

    Guess my number game in VBA - incorrect response to higher value input for first answer

    Hello! I am just working through making this (primarily for fun) and have encountered a weird error - this is a guess the random number game. The code generates a random number & assigns it to the variable myNumber. The user is prompted to guess the number & their guess is assigned to the...
  10. R

    Decreasing Do Until loop

    Hi guys, I'm pretty new to coding but I need it for a dissertation on auctions. Any help is greatly appreciated!! A simplified version of what I am trying to achieve is to have a blank excel file with the number 10 in A1. I then want to run a Do Until loop with "A1 - 1" until it gets to zero...
  11. M

    If Statement Kills the Do Loop

    I am trying to loop through data with the same if statement but once the if statement is fulfilled the first time the loop no longer calls the if statement for some reason, can someone please help? here is my code: *Row = 6 at this point Do Until Row = 36 If ActiveSheet.Cells(Row...
  12. A

    Getting .Find Method to stop at bottom of range (NOT loop around)

    Hi all, Thanks for all of the help previously. Here's a problem I'm having: I am using the .find method in a Do...While Loop to find duplicate values, but I want the loop to stop when it gets to the bottom of the range, not wrap around and search from the top (another way to put it would be...
  13. S

    Combine multiple sheets with same name from seperate wbs in a folder into one workbook

    Hello All, I want to combine a specific tab ("Summation") in all workbooks in a folder to a single workbook. I have my macro asking for the file path, a file name pattern and the tab name from each workbook. The only 2 I really need are the file path and the tab name but the middle is just...
  14. C

    VBA - Loop through list, copy/paste from 1st to 2nd sheet, copy/paste output from 2nd to 3rd sheet

    Summary Problem: I need to loop through a company list, copy a company from said list, one at a time, from first to second sheet, then copy a range output from the second sheet to a third sheet. I need that output that is pasted on the third sheet to be pasted moving down every third row (also...
  15. B

    Do Whie Loop to Add Days to Date

    Hello all, I am trying to create a function that would allow me to select a date cell and add a certain amount of days to it until it is larger than the current date. I keep crashing excle with the function below any suggestions? Seems like I am declaring the variables incorrectly. Public...
  16. N

    Do Until Loop, Loop help please

    I am trying to run a ‘Do Until’ loop in my macro that will search for a word, if its found, select the whole row containing that word, delete it, find the next and repeat. So far I have:</SPAN></SPAN> Do</SPAN></SPAN> Cells.Find(What:="Find_Word", After:=ActiveCell, LookIn:=xlFormulas...
  17. S

    What is wrong with this Do Until Loop? (simple)

    Thanks in advance for the time. I'm trying to set a Do Until loop and after the range sets, VBA just skips the loop. I want a macro that hides all "0" value columns. What's actually in the loop can be wrong as well, but I just want to know why VBA skips the loop. My logic is that the range is...
  18. D

    do until loop with if statement that applies on different columns (vba)

    Hi, I'm scratching my head around what I think "a very simple piece" of code...but I'm a VBA beginner I have to perform 2 tasks, and while I've completed the first one, the other is giving me a lot of troubles... 1st step: clear the content of a range of cells when I switch the xls validation...
  19. M

    VBA lookup dates and return <today

    Hi all i have a spreadsheet that has various column with dates in and other columns with names in. i would like a macro to look through each column one row at a time, check for dates less than today and present a message box to say "x persons name has a deadline due" and add that date that is...
  20. C

    Vba for deleting bill of material data for purchased parts

    Mr. Excel, I am attempting to find/write some VBA code for looking at a manufacturing Bill fo Material for a finished product, and deleting any Bill of Material Lines below purchased parts. Assuming the "Line#" heading below is in cell A1, can you help me with some VBA code for this? The...

Watch MrExcel Video

This Week's Hot Topics

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
Top