redim

  • Thread starter Thread starter ranswrt
  • Start date Start date
R

ranswrt

How do I count how many times a value is in a range to redim an array to that
size?
Thanks
 
How do I count how many times a value is in a range to redim an array to that
size?
Thanks

You could use the Countif worksheet function... so you would enter it
in VBA as application.worksheetfunction.countif( The Range , The
Value).

Using this method the range would be the same the VBA range so
application.worksheetfunction.countif( Range("E:E") , 15 ) = how many
time 15 appears in column E.

Hope that helps,

James
 
Thanks

You could use the Countif worksheet function... so you would enter it
in VBA as application.worksheetfunction.countif( The Range , The
Value).

Using this method the range would be the same the VBA range so
application.worksheetfunction.countif( Range("E:E") , 15 ) = how many
time 15 appears in column E.

Hope that helps,

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top