98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Creating a do until loop inside a do until loop | Excel forum
Creating a do until loop inside a do until loop | Excel forum
Resolved · Low Priority · Version 2010
Sean has attended:
Excel Advanced - Formulas & Functions course
Excel VBA Introduction course
Creating a do until loop inside a do until loop
Afternoon all. I am trying to nest a do until loop inside another do until loop, i understand this logic wont work so whats the best way to perform this function, this is what i have done so far. (both loops work in their own right just not when put together:
Do Until ActiveCell = ""
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("List").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Select
Do Until ActiveCell.Offset(-1, 6) = 1
If ActiveCell.Offset(-1, 6) > 1 Then
ActiveCell.Offset(-1, 0).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 6).Select
ActiveCell.FormulaR1C1 = "=R[-1]C-1"
ActiveCell.Offset(1, -6).Select
End If
Loop
Sheets("Paste ").Select
ActiveCell.Offset(1, 0).Select
Loop
any help would be appreciated
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Fill formulae across a sheetTo copy a formula down a spreadsheet where there is data underneath, to the left or to the right of the formula, double-click on the fill handle. The fill handle is the little black cross that appears in the bottom right-hand corner of the formula cell. Unfortunately, no similar facility exists to copy formulae across the sheet. |