do while

  1. P

    Help with the Do While Loop

    Hi, Code mentioned below has an issue to it. I have two columns ( A & B ) A contains unique IDs B contains values I'm using a macro with a loop to update the values in B column for respective IDs. However, the condition to stop the loop is not working. The null value condition is working...
  2. E

    Max Difference Between Two Dynamic Ranges

    Let's assume our example data set is as follows: Column A1:A9 10 12 14 12 10 15 20 25 20 Column B1:B9 10 10 11 11 9 9 11 11 10 I'm looking for a one cell formula/vba code that will show the maximum difference between the maximum value of a dynamically increasing range in column A1:A9 and...
  3. 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...
  4. 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...
  5. 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...
  6. szita2000

    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...
  7. 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...
  8. 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...
  9. 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...
  10. 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.
  11. 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...
  12. 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>...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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)...
  18. 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...
  19. 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...
  20. 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...

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