Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim x As Long, y As Long, z As Long, searchstring As String
If ActiveCell = "" Then Exit Sub searchstring = "DS45" x = Range("I65536").End(xlUp).Row y = Application.WorksheetFunction.CountIf(Range("I:I") , searchstring) If y 3 Then MsgBox "This Customer has reached their limit. Only 3 DVD's allowe per customer!" & vbCrLf & vbCrLf & "Mark Smith - Manager" vbInformation + vbOKOnly, "Disc Emporium - DVD Limit Check" ActiveCell = "" ActiveCell.Offset(, 5) = "On shelf" I have the above formula which checks the search string for a value o more than 3 entries, then brings up a message box...But, this work fine, however, I have other strings that also needed to be checked..Ho can I get the code to check more than one besides the "DS45"...I hav 20 or so more numbers in my datebase that I would like to check fo greater than 3...Any help would be great Thanks Mar -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with COUNTIF | Excel Discussion (Misc queries) | |||
Problem w countif | Excel Discussion (Misc queries) | |||
COUNTIF problem with NOW() | Excel Worksheet Functions | |||
Countif Problem | Excel Discussion (Misc queries) | |||
countif(and) problem | Excel Programming |