vba - Count number of values in a column (Values are Number in Text format) -


i've run snag.

i'm writing macro pulls values our mainframe. number of values change each run. values numbers in text format. important keep format because used purpose. unfortunately, since work sensitive data unable post code have because on work laptop.

basically, code spins through table of values , pulls each value in position. @ end of code i'm wanting put count count number of cells value. remember value change, example in 1st run can pull 100 values, 2nd run pull 1000 values.

at end of loop thought putting following, since values on in text format error.

application.worksheetfunction.count range("d1:d7000") me.cells(x,x) = application.worksheetfunction.count range("d1:d7000") 

error message

run-time error 1004

application-defined or object defined error

i know has format, because when change values text works fine.

ideas?

counta might need. counts non-empty cells whereas count counts cells containing numbers


Popular posts from this blog