Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Patti" ha scritto nel messaggio
... Try this. --------------------------- Option Explicit Private Sub testloop() Dim lstrow As Long Dim i As Long Dim j As Long Dim agtname As String, papi As String lstrow = Range("a" & Rows.Count).End(xlUp).Row papi = Range("A2").Text For i = 2 To lstrow agtname = Range("a" & i).Text If agtname = papi Then If Cells(i, 2).Value < "" Then Select Case Cells(i, 2) Case "This" MsgBox "Current Type for " & agtname & " is blah blah blah" & i Case "That" MsgBox "Current Type for " & agtname & " is yada yada yada" & i Case Else MsgBox "Current Type for " & agtname & " is " & Cells(i, 2) & " " & i End Select End If Else papi = agtname MsgBox "moved on!" i = i - 1 End If Next i End Sub ------------------ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop question | Excel Discussion (Misc queries) | |||
Loop question | Excel Discussion (Misc queries) | |||
Password Loop question. | Excel Discussion (Misc queries) | |||
For loop question | Excel Programming | |||
For Loop and If Statement question | Excel Programming |