Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I am a VBA dummy. I am stuck on the following: I have a cell GJ1 that will either have a 1 or a 0 value. My routine needs to loop until GJ1 changes from 0 to 1. The solutions that I have seen on the Internet use counters to count loops until a condition is met. In my case, counters or incrementing is not applicable since the condition that determines if GJ1 is 1 is not based on counters or incrementing but on user input. The example below is what I am trying. I can get the loop to work, but then it just keeps looping infinitely. Sub PasteValuesTill() ' The code below must loop until cell GJ1=1. GJ1 can only have values of 0 or 1. ' Sheets("ThisSheet").Select Range("E5:G5").Select Selection.Copy Range("F2:G2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Do Until GJ1 = 1 Loop End Sub -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Incrementing a formula within an excel cell | Excel Worksheet Functions | |||
Incrementing cell addresses | Excel Worksheet Functions | |||
Incrementing cell reference | Excel Discussion (Misc queries) | |||
incrementing mm/yy based on value in other cell | Excel Worksheet Functions | |||
Incrementing Cell Numbers | Excel Discussion (Misc queries) |