countif in VB
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 |
countif in VB
Dim Stock As Long
Stock = Application.CountIf(ActiveSheet.Range("a:a"), "*stock*") MsgBox Stock mohavv wrote: 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 |
All times are GMT +1. The time now is 02:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com