LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Limit occurrences using VBA

Hi,
I have a list of numbers in column A that are grouped together. What I need to do is count the number of each numeric occurrence and alert the user if the number is greater than 2. So if I have the number 5 show up 3 times. The user will be notified that there is a problem. I believe the code would be similar to:

If Application.Countif(ColumnA:A, rowname) 2 then
MsgBox "Problem on line" & rowname & "."
End if

Thanks,
James
 
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
counting occurrences dpwicz Excel Discussion (Misc queries) 2 October 2nd 08 06:25 PM
Unique occurrences of a value Q Sean Excel Worksheet Functions 7 December 30th 06 01:55 PM
sort 2 or more occurrences akullen Excel Worksheet Functions 2 April 10th 06 03:38 AM
# of occurrences gbeard Excel Worksheet Functions 1 May 5th 05 09:50 PM
Nested IF limit or Open parentheses limit Fred Excel Discussion (Misc queries) 5 December 23rd 04 03:34 PM


All times are GMT +1. The time now is 06:28 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"