do while

  1. N

    Do while loop

    I am hoping someone can help, I am trying to add a 'do while' type loop into some existing code. The current code makes manual changes to my data dump but it can only do one row at a time. Sometimes there are a large amount of rows which all need the same adjustment made to them so i need the...
  2. C

    Delete Blank Rows and Loop or Do While

    I am using Excel 2013 and I need some help on a couple of my Spreadsheet. I have blocks of data down the spreadsheet that are separated with a blank row. The data is of a variable length but currently the blocks stretch from A1 to approximately J1000 I would like to be able to delete the blank...
  3. K

    Using a Do while loop, sum all the even numbers from 0 to the number entered.

    I need help writing a sub that asks the user for a positive integer less than 100. Using a Do While loop sum all the even numbers from 0 to the number entered. Display the results of this calculation in a MsgBox. Assume 0 is an even number. Check to be sure that the number is within the...
  4. S

    Userform textbox input with barcode scanner. How to do a do while loop?

    Hi All. So I am knee deep in VBA, trying my best to make it work. I am building a userform that will tally up barcodes with a scanner. My scanner is set to append an enter at the end of a read. Hence the keydown event. Just a quick rundown for all the funny business my code trying to do...
  5. A

    Access With Do Until Loop PROBLEMS! Loop without Do error!

    I'm not sure of the order or syntax of what I need here. The user intends to remove a Personal Day that they have scheduled from their calendar. The user enters a date that they have a Personal Day scheduled and pushes a button to delete it. I want to check to make sure they actually have a...
  6. Maximus Tatius

    If clause is breaking my Do While loop

    I have some code which looks for some Word files in a particular folder, opens each one in turn and populates a spreadsheet with some document properties (including the "Subject" field - which is the reason I need to open them all). This works fine and I've tweaked my code so that the list of...
  7. T

    If statement inside of Do While Loop

    I am trying to perform a loop through a file folder and pull all of the file names and paste them in my range EXCEPT I want it to skip all files that have Zero Reading in the name. Any help? In my code below I cannot get the If statement to skip all file names containing "Zero Reading" in the...
  8. B

    What's the difference between Do While and Do Until?

    Do Until thisBoolean = True... Will keep going "while" thisBoolean is False Do While thisBoolean = False... Will keep going "until" thisBoolean is True. They're like inverses of each other. Don't forget you can also use the NOT operator.
  9. H

    Issues with my Do Until Code

    Good morning i'm having issues with a line in my code and or i'm not using it right. Everything seems to be working except the bolded line of code. It brings in the correct data from the other sheets and it sums them but it just copies the data in row 3, column 6 all the way till end of my Do...
  10. L

    Transposing data with Loop

    Hello all, I am hoping for some assistance with a code I have been working on. The purpose of the code is to transpose sets of data from a column that are separated by blank rows into a summary table in the same workbook. An example of what I am trying to accomplish is provided below: <tbody>...
  11. A

    Do While loop with dates. Trying to find min and max values for a given year... help!

    As you can imagine, I just started programming with VBA, and I've decided to tackle a problem with dates... With limited success up to now. I'm using MAC Excel 2011. I have a table with three columns, the 1st column has dates, the second and third, prices. For a given year, I'm trying to...
  12. G

    Do Until loop not stopping

    I have the following code for a Do Until, but it is not stopping at the given point. You Help will be greatly appreciated Sub Macro6() ' ' Macro6 Macro ' ' Dim LastRow As Long LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row Dim CurrentRow As Long CurrentRow = ActiveCell.Row...
  13. K

    Do While Do While Do While Loop Loop Loop

    Hi, Are you able to see where I would be getting stuck in the below? I am trying to ascertain which values in a given cell are matching the values in cells B,C,D,E,F & G2 I have 5 groups of data (hence z<6), 24 columns (hence Y<=t(where t is increased to 24)) and 35 rows (hence x<=u(where u is...
  14. R

    Populate Form Based On Non Unique Number and Display Next 3 Instances of that number

    Hello all! It's been a few years since I've needed your assistance, but alas, the draw of programming VBA sucked me in once again. I've developed a program for data entry for a record store that sells online years ago and the code still functions fine although some modules need improvement...
  15. Prevost

    Do While Loop Using counter and equal variable conditions

    Hi There, I am trying to run a do while loop with two conditions but I can't get it to work properly. The user selects a wire gauge, and then the macro compares the selected cell value to a list of existing gauge values to determine whether or not any of the match up, hence the AWGCell(1 to 55)...
  16. D

    Looping limitation - Help on Copying Rows to New File

    Hello - I have a database that needs breaking down in order to fulfill a request. I've been trying to create a macro to copy one row to a new workbook (starting from row 3), file name save as a value of the cell (C1), and move onto the next row. However, my code appears to only loop through...
  17. A

    Empty Data Issue

    I have a program written that pulls prices for the value of contracts Jan-Dec, each day of the year. ( Meaning theres a price today for contracts in jan, feb, mar....etc). My problem is how to bypass empty data, for say, christmas which will yield a row of 12 0's (ex. 1/25/2012 will have a 0 for...
  18. A

    Do While Sytax

    Hi all , I wrote code that works just fine, however, I realized there were parts of the data I was using that had 0's in it for holiday. Bottom line, this is code that calculated the weighted average of prices for 12 months (12 rows across) and Drows across. I'm trying to use the "do while is...
  19. D

    Do While and xlDown?

    I have a pretty big task in mind, and I'm stuck on a lot of parts. I've outlined it below: 1. search for a specific phrase in the spreadsheet (exact phrase, match entire cell contents). Store its index. This is easy enough: Cells.Find(What:="Vendor Terminal p/n", After:=ActiveCell, LookIn:= _...
  20. F

    Loop expression won't recognize values are equal

    Hi all, (Excel 2007) The issue I'm having is that a loop statement of mine is failing to recognize that a couple values are equal. It works for the first 3 iterations of the loop, then stops recognizing. I tried copying another set of numbers in the failing one's place, and that actually...

Some videos you may like

This Week's Hot Topics

Top