Searching for greater than 1 value in a column Excel VBA -
anybody knows here how value greater 1 in column?
set filesheet = wb.activesheet filesheet.name = "test" set rng = filesheet.range("d:d") set rngfound = rng.find(">1") if rngfound nothing msgbox "no value" end if
i'm trying way, know if put double qoute, treated string, there way can greater 1 value before filtering it? please note working column has thousands of data.
this should speed things up, assuming cells contain numbers rather formulas. array quicker, depends trying achieve.
sub x() dim r range, filesheet worksheet, rng range set filesheet = wb.activesheet filesheet.name = "test" set rng = filesheet.range("d1", filesheet.range("d" & rows.count).end(xlup)).specialcells(xlcelltypeconstants, xlnumbers) each r in rng if r.value > 1 'do whatever end if next r end sub
Comments
Post a Comment