excel - Comparing two sets of data, one is rounded to 7 decimals places and the other to 8 -


i comparing 2 sets of data. need part of if statement. looks this:

sheets("sheet1").select  dim cell range  each cell in range("a3:a200")     if [condition1] , [condition2] , [condition3] , _           worksheets("name1").range("be" & cell.row - 1) = worksheets("name2").range           ("x" & cell.row)         [do code]     else         [do something]     end if     ... next 

there 50 conditions. "name1" sheet has 8 decimals places in be , "name2" sheet has 7 in x. it's failing. how can round or fix this?

something along lines of:

if round(worksheets("name").range("be" & cell.row - 1) , 7) 

can used round of cells 8 decimal places down seven. if perhaps still don't match due precision, can round each of cases down 6 (or 5, or 4...) decimal places. may possibly reduce precision, increase number of matches.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -