Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with loop-I'm stuck
I am trying to loop through a pivot table to look for values by row. The
number of rows and columns will vary. Basically, if in Row 5 only one cell from Column B to the last column(not counting the "Grand Total") is not blank then the column after "Grand Total" should say "First Time". If Columns C and D are not blank the first column after "grand Total" should say "Two Times in a Row". etc, etc. Here's what I have. This is too advanced for me. Dim LastCell As Range Dim WS As Worksheet Set WS = ActiveSheet Set LastCell = WS.UsedRange.SpecialCells(xlCellTypeLastCell) Set lastcol = LastCell.Offset(-1, -1) lstrw = .Cells(Rows.Count, "a").End(xlUp).Row For myrow = lstrw To 5 Step -1 For Each Row In myrow If Range("B:" & lastcol).Value 'stuck here |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
stuck in loop | Excel Programming | |||
stuck at a loop | Excel Programming | |||
Stuck in a Sub Loop | Excel Worksheet Functions | |||
Stuck in a loop | Excel Discussion (Misc queries) | |||
HELP - Stuck in loop | Excel Programming |