Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default most popular keyword

How to define the most popular keyword within one list?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default most popular keyword

This should do it for you:

Sub Count1()
Dim lRow As Long, i As Long, j As Long
Dim C As Range, Lst As Range

lRow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
Set Lst = Range("A1:A" & lRow)

For Each C In Lst
If C.Value = "" Then GoTo skip
C.Offset(0, 1).Value = 1
If C.Row = 1 Then GoTo skip
If C.Value = C.Offset(-1, 0).Value Then
C.Offset(0, 1).Value = C.Offset(-1, 1).Value + 1
End If
skip:
Next C
End Sub


Sub Count2()
Dim lRow As Long, i As Long, j As Long
Dim C As Range, Lst As Range

lRow = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
Set Lst = Range("A1:A" & lRow)

For Each C In Lst
If C.Value = "" Then GoTo skip
C.Offset(0, 1).Value = 1
If C.Row = 1 Then GoTo skip
If C.Value = C.Offset(-1, 0).Value Then
C.Offset(0, 1).Value = C.Offset(-1, 1).Value + 1
End If
skip:
Next C
End Sub

HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Tony_student" wrote:

How to define the most popular keyword within one list?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default most popular keyword

Try this array formula** :

Assumes no empty cells within the range. If there are no duplicates the
formula returns #N/A.

=INDEX(A1:A10,MODE(MATCH(A1:A10,A1:A10,0)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Tony_student" wrote in message
...
How to define the most popular keyword within one list?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default most popular keyword

A few mo
=INDEX(A1:A20,MATCH(MAX(COUNTIF(A1:A20,A1:A20)),CO UNTIF(A1:A20,A1:A20),0))
(this is a CSE function)

=INDEX(A1:A20,MODE(MATCH(A1:A20&"",A1:A20&"",0)))

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"T. Valko" wrote:

Try this array formula** :

Assumes no empty cells within the range. If there are no duplicates the
formula returns #N/A.

=INDEX(A1:A10,MODE(MATCH(A1:A10,A1:A10,0)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Tony_student" wrote in message
...
How to define the most popular keyword within one list?




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
IWC Aquatimer Watch, Popular Wristwatch [email protected] Excel Discussion (Misc queries) 0 February 5th 09 03:56 AM
Most popular names in a list cqmman Excel Discussion (Misc queries) 2 September 6th 07 02:29 PM
Most popular items in a list Eddie Excel Worksheet Functions 1 December 2nd 05 10:59 AM


All times are GMT +1. The time now is 08:10 PM.

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

About Us

"It's about Microsoft Excel"