Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / General Excel Questions / March 2008

Tip: Looking for answers? Try searching our database.

countif in VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mohavv - 31 Mar 2008 23:22 GMT
Hi,

Can this be done shorter, without using cell B1

Range("B1").Formula = "=COUNTIF(A:A,""*Stock*"")"
Stock = Range("B1").Value
Range("B1").Clear

Cheers,

Harold
Dave Peterson - 31 Mar 2008 23:58 GMT
Dim Stock As Long    
   Stock = Application.CountIf(ActiveSheet.Range("a:a"), "*stock*")    
   MsgBox Stock

> Hi,
>
[quoted text clipped - 7 lines]
>
> Harold

Signature

Dave Peterson


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.