Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
Still haven't quite grasped the above, can anyone help with the correct syntax please... Essentially, I need it to loop through i until all the 4 statements are fulfilled, then step out and end once it is achieved I wasn't entirely sure this is the right idea, or if a Case statement may serve better. Sub MyValueOffset() Dim i As Integer Do While Cells(i, 14).Value 0 For i = 6 To 250 If Cells(i, 14).Value = 20 Then Cells(i, 14).Offset(0, 21).Value = 1 If Cells(i, 14).Value < 13 9 Then Cells(i, 14).Offset(0, 21).Value = 2 If Cells(i, 14).Value < 9 6 Then Cells(i, 14).Offset(0, 21).Value = 3 If Cells(i, 14).Value < 5 Then Cells(i, 14).Offset(0, 21).Value = 4 End If End If End If End If Next i Loop End Sub TIA Mick |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Case not recognized in Select Case | Excel Programming | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
End Select without Select Case, Block If without End If errors | Excel Programming | |||
VBA Loop Case..If syntax | Excel Programming |