PDA

View Full Version : how to find the last specified cell row in VBA



selvajan23
02-27-2012, 05:37 AM
I have the following value in my excel

Group Name Item
t1 Nothing
name1 Date
22-Oct-04
23-Oct-04
Group Name Item
t2 Nothing
name2 Date
18-Nov-04
14-Nov-04
18-Nov-04
19-Nov-04
Group Name Item



i need to find out the total count of values between one group name to second group name ,

i have more than 50 group names are avail in it . i need to take the count upto second group name row .
if i use Sheet3.Range("A").End(xlDown).Row, it returns the last row of the used cells.

please help it.

Regards
Selva.C

mohanvijay
02-27-2012, 08:08 PM
post a sample workbook

selvajan23
02-28-2012, 07:39 AM
Please find the attachment,

I need it to take the count from each group to each group name

For that i have used the following code,

But it is not as good code,

Please have a look on it.

Prodcnt = 1

While Sheet1.Cells(Prodcnt, 1).Value <> "Group Name" Prodcnt = Prodcnt + 1
Wend


Please help on this

CatDaddy
02-28-2012, 02:00 PM
take the count of what? and which are the group names?