LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
al al is offline
external usenet poster
 
Posts: 363
Default Variable counting of rows

Ive got these few lines of code that work fine on for a group of cells Im
calling Large that starts on row 5:

Columns("A:A").Select
Selection.Find(What:="Large", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(2, 1).Range("A1").Select
NumRows = Range("B5", Range("B5").End(xlDown)).Rows.Count
For x = 1 To NumRows
If ActiveCell.Offset(0, -1) = "SEL" Or ActiveCell.Offset(0, -1) = "Asset
CL" Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(0, -1).Range("A1").Select
ActiveCell.Range("A1:S1").Select
Selection.Delete Shift:=xlUp
ActiveCell.Offset(0, 1).Select
End If
Next

Im looking for a modification for the next group of cells.

How might I re-define NumRows to handle all my cell groups that start on
rows further down my sheet?

--
Thank you
 
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
Counting variable ranges and auto-summing variable ranges Father Guido[_5_] Excel Programming 2 March 29th 06 04:07 AM
Counting Rows Then Counting Values in Columns Michael via OfficeKB.com Excel Programming 1 June 1st 05 04:10 PM
Counting Variable Length of Rows in a Named Range jandre[_2_] Excel Programming 0 October 28th 04 06:26 PM
Counting Variable Length of Rows in a Named Range jandre[_3_] Excel Programming 0 October 28th 04 06:24 PM
Counting Variable Length of Rows in a Named Range jandre Excel Programming 1 October 28th 04 05:27 PM


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

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

About Us

"It's about Microsoft Excel"