Hi All,
I would like to write a formula by using vba code
sheet1 A column i have data, row is not constant it will change
i would like to count the A column data
Ex:
A
10
20
30
--
--
Hi All,
I would like to write a formula by using vba code
sheet1 A column i have data, row is not constant it will change
i would like to count the A column data
Ex:
A
10
20
30
--
--
Perhaps the COUNTA function ?
ye, but i need the formula in vba code
Does this help?
![]()
Sub uttam_mothezz() Range("A" & Rows.count).End(3)(2).Formula = "=SUM(A2:A" & Range("A" & Rows.count).End(3).Row & ")" End Sub
maybe like this? (assumes your data are of same datatype as you posted)![]()
Sub cccc() Const n& = 10 ^ 5 Dim b&(n), c For Each c In Cells(1).Resize(Cells(Rows.count, 1).End(xlUp).Row).Value If Len(c) > 0 Then b(c) = b(c) + 1 Next c For Each c In Cells(1).Resize(Cells(Rows.count, 1).End(xlUp).Row) If b(c) > 0 Then c.Offset(, 1) = b(c) Next c End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks