Find non scientific notation value in excel -
i wish find cell value in excel 2013 using vba. have tried works fine long column wide enough.
set foundcell = thisworkbook.sheets(1).rows(1).find(what:="201402", lookin:=xlvalues)
however, if column not wide enough number shown in scientific notation, "2e+05", not found above row, if search value in non-scientific notation. work long cell contains value , not formula:
set foundcell = thisworkbook.sheets(1).rows(1).find(what:="201402", lookin:=xlformulas)
however, in case cell value formula referencing cell ("=c1"), in case neither of above work.
so, possible search "201402" , find in row 2, in following scenario?
- create new workbook in excel 2013
- insert 201402 in cell c1
- insert =c1 in cell c2
- make column c narrow enough scientific notation shown
neither of work:
set foundcell = thisworkbook.sheets(1).rows(2).find(what:="201402", lookin:=xlvalues) set foundcell = thisworkbook.sheets(1).rows(2).find(what:="201402", lookin:=xlformulas)
how following
sub findthis() dim c range each c in cells if c.value = "201402" c.select exit end if next end sub
Comments
Post a Comment