Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I write a macro to count a series of text?
example x,y,z = 3 -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
not quite sure but maybe sub foo() dim svalue as string dim counter svalue = "x,y,z" counter = len(svalue) - len(replace(svalue,",","")) +1 msgbox counter end sub -- Regards Frank Kabel Frankfurt, Germany "vedrah " schrieb im Newsbeitrag ... How can I write a macro to count a series of text? example x,y,z = 3? --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or maybe
Msgbox worksheetfunction.counta(Range("A1:H1")) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Frank Kabel" wrote in message ... Hi not quite sure but maybe sub foo() dim svalue as string dim counter svalue = "x,y,z" counter = len(svalue) - len(replace(svalue,",","")) +1 msgbox counter end sub -- Regards Frank Kabel Frankfurt, Germany "vedrah " schrieb im Newsbeitrag ... How can I write a macro to count a series of text? example x,y,z = 3? --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks.
but it gets more complicated... I have a series of text many x's , many y's and many z's. So how do I count only the x's, y's and z's? help...... -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
you may first explain how you have stored these values? - different cells - in a single cell separated by comas -- Regards Frank Kabel Frankfurt, Germany "vedrah " schrieb im Newsbeitrag ... thanks. but it gets more complicated... I have a series of text many x's , many y's and many z's. So how do I count only the x's, y's and z's? help....... --- Message posted from http://www.ExcelForum.com/ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Frank,
The data is arranged as follows: x a x b x c x d y e y f y g z h z i z j z k z l how do i count items in column A. hope u can help. vedra -- Message posted from http://www.ExcelForum.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
msgbox application.worksheetfunction.countif(Range("A1:A1 00"),"x") -- Regards Frank Kabel Frankfurt, Germany "vedrah " schrieb im Newsbeitrag ... Hi Frank, The data is arranged as follows: x a x b x c x d y e y f y g z h z i z j z k z l how do i count items in column A. hope u can help. vedrah --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple Criteria, Count If, Sum Product to get count across range | Excel Worksheet Functions | |||
Count Employee Work Time - Don't Double-count Overlapping Apts. | Excel Worksheet Functions | |||
Excel 2000, count, sort a list & count totals? | Excel Worksheet Functions | |||
Count Intervals of 2 Numeric values in same Row and Return Count across Row | Excel Worksheet Functions | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions |