ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Counting cells thru VBA (https://www.excelbanter.com/excel-programming/300952-counting-cells-thru-vba.html)

abxy[_64_]

Counting cells thru VBA
 
Ok, i'm trying to have a label on my userform keep a count of how man
cells on all the worksheets in my workbook in the range H1:H275 an
J1:J275 have today's date in them in them. How can I do this?

Thanks in advance :

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Counting cells thru VBA
 
With WorksheetFunction
num = .Countif(Worksheets("Sheet1").Range("H1:H275),Date ) + _
.Countif(Worksheets("Sheet1").Range("J1:J275),Date )
Ed With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"abxy " wrote in message
...
Ok, i'm trying to have a label on my userform keep a count of how many
cells on all the worksheets in my workbook in the range H1:H275 and
J1:J275 have today's date in them in them. How can I do this?

Thanks in advance :)


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com