LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 91
Default count rows in a column for looping

I was using this code

RwsCnt = ActiveSheet.UsedRange.Rows.Count
for i = 1 to RwsCnt

'Code

Next i

it works correctly but the value of the row count increases as the
macro goes along

how can I get this to count just the rows in column B?

 
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
looping through rows and columns mattguerilla Excel Discussion (Misc queries) 1 March 20th 07 05:14 PM
Count the number of rows where more than one column meets set crit BarrieVoice Excel Worksheet Functions 2 July 14th 06 07:25 PM
Looping a selection of rows Andre Kruger Excel Discussion (Misc queries) 1 December 15th 05 04:18 PM
Count rows that match criteria in 2 different column cell ranges JoAnn New Users to Excel 2 December 9th 05 05:51 PM
Looping until empty column theguz Excel Discussion (Misc queries) 1 August 4th 05 07:04 PM


All times are GMT +1. The time now is 08:45 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"