LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
stuck in loop Trish Smith Excel Programming 6 September 19th 08 11:31 AM
stuck at a loop computers hate me Excel Programming 6 August 4th 08 02:19 PM
Stuck in a Sub Loop robzrob Excel Worksheet Functions 4 July 19th 08 11:53 PM
Stuck in a loop CWillis Excel Discussion (Misc queries) 2 June 5th 06 02:49 PM
HELP - Stuck in loop gti_jobert[_92_] Excel Programming 3 April 27th 06 01:41 PM


All times are GMT +1. The time now is 07:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"