Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Pivot...and macro.

Hello there,

I have a column. I need to know how many time a particular 'text'
appears in this column.
This is not a problem if I use COUNTIF, or If I check any single row
with some counters. In this way when I find the desired 'text' I
increase the counter assigned to that 'text'.

But this works only if I know in advance the 'text' I must check, in
other words what I need is like building a simple pivot table for one
column...how can I do it?. (I don't want really
want to use the macro registrator creating the pivot etc.)

thanks.

Ale.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Pivot...and macro.

You could put the text in another cell and use countif

=countif(A:A,"*"&B9&"*")

or for an exact match

=Countif(A:A,B9)

--
Regards,
Tom Ogilvy


"Alex" wrote in message
ups.com...
Hello there,

I have a column. I need to know how many time a particular 'text'
appears in this column.
This is not a problem if I use COUNTIF, or If I check any single row
with some counters. In this way when I find the desired 'text' I
increase the counter assigned to that 'text'.

But this works only if I know in advance the 'text' I must check, in
other words what I need is like building a simple pivot table for one
column...how can I do it?. (I don't want really
want to use the macro registrator creating the pivot etc.)

thanks.

Ale.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Pivot...and macro.

Hi Tom,
this works only if I know in advance the text I'm looking for.
I have instead a column:

white
red
black
white
back

the result I'd like is:

white 2
red 1
black 1
back 1

The fact is that I don't know in advance the text in every cell of the
column...

thanks...

Ale.



Tom Ogilvy ha scritto:

You could put the text in another cell and use countif

=countif(A:A,"*"&B9&"*")

or for an exact match

=Countif(A:A,B9)

--
Regards,
Tom Ogilvy


"Alex" wrote in message
ups.com...
Hello there,

I have a column. I need to know how many time a particular 'text'
appears in this column.
This is not a problem if I use COUNTIF, or If I check any single row
with some counters. In this way when I find the desired 'text' I
increase the counter assigned to that 'text'.

But this works only if I know in advance the 'text' I must check, in
other words what I need is like building a simple pivot table for one
column...how can I do it?. (I don't want really
want to use the macro registrator creating the pivot etc.)

thanks.

Ale.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Pivot...and macro.

Hi Tom,
this works only if I know in advance the text I'm looking for. What I
need is, based on a column, a list with the number of times the text
appears:

for example a column with:

white
red
black
white
whit

the resutls:

white 2
red 1
black 1
whit 1


The fact is that I don't know in advance the text to be searched in the
column.

Thanks,
Ale.


Tom Ogilvy ha scritto:

You could put the text in another cell and use countif

=countif(A:A,"*"&B9&"*")

or for an exact match

=Countif(A:A,B9)

--
Regards,
Tom Ogilvy


"Alex" wrote in message
ups.com...
Hello there,

I have a column. I need to know how many time a particular 'text'
appears in this column.
This is not a problem if I use COUNTIF, or If I check any single row
with some counters. In this way when I find the desired 'text' I
increase the counter assigned to that 'text'.

But this works only if I know in advance the 'text' I must check, in
other words what I need is like building a simple pivot table for one
column...how can I do it?. (I don't want really
want to use the macro registrator creating the pivot etc.)

thanks.

Ale.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
macro for a pivot anu Excel Discussion (Misc queries) 2 August 11th 06 04:48 PM
Steps from Macro recorder for Pivot table will not run as a Macro Nancy[_5_] Excel Programming 0 April 2nd 04 10:33 PM
pivot macro Tony Excel Programming 2 January 28th 04 12:03 AM


All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"