VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,274
- Office Version
- 365
- Platform
- Windows
Hi,
Anyone have an idea about following.
col C
c7 van
c8 van
c9 van
c10 van
c11 van
c12 peninsula
c13 peninsula
c14 peninsula
c15 brazil
c16 brazil
c17 brazil
c18 brazil
As soon as the value change in c12, from c7 to c11 value need count.
How this value can i get counting of cells of same data?
I am using following code, if any one having idea kindly provide great solution.
Anyone have an idea about following.
col C
c7 van
c8 van
c9 van
c10 van
c11 van
c12 peninsula
c13 peninsula
c14 peninsula
c15 brazil
c16 brazil
c17 brazil
c18 brazil
As soon as the value change in c12, from c7 to c11 value need count.
How this value can i get counting of cells of same data?
I am using following code, if any one having idea kindly provide great solution.
Public Function group()
Dim i As Long, j As Long
'Dim p As Integer
i = Range("C" & Rows.Count).End(xlUp).Row
For j = 7 To i
If Cells(j, 3) <> Cells(j + 1, 3) Then
p = Cells(j, 11)
Range(Cells(j, 3), Cells(p, 11)).Select <-- ' i knw dis is nt proper
Selection.Rows.group
'Else
' lngRow = lngRow + 1
End If
Next j
End Function