Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
For i = 1 To Cells(Rows.Count, 2).End(xlUp).Row
-- Gary''s Student - gsnu200714 "damorrison" wrote: 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? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Apr 8, 2:48 pm, Gary''s Student
wrote: For i = 1 To Cells(Rows.Count, 2).End(xlUp).Row -- Gary''s Student - gsnu200714 "damorrison" wrote: 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? Great , thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
looping through rows and columns | Excel Discussion (Misc queries) | |||
Count the number of rows where more than one column meets set crit | Excel Worksheet Functions | |||
Looping a selection of rows | Excel Discussion (Misc queries) | |||
Count rows that match criteria in 2 different column cell ranges | New Users to Excel | |||
Looping until empty column | Excel Discussion (Misc queries) |