Percentage Kinda :)

donbettis

Old User Gone Astray
Local time
Today, 17:56
Joined
Jan 23, 2001
Messages
103
Access I understand - Excel I am almost clueless in :confused:

I have 3 columns in a spreadsheet. Column A is numbers (1234), Column B is numbers (4321), Column C needs to have a formula that returns true of false based upon the numbers in Column's A and B.

If possible this needs to look at both Column A and column B and return True if the numbers are within 0-2% of each other and False if the numbers are greater then 2% apart.

Hope this makes sense.

Any and all help would be greatly appreciated.

Thanks
 
Maybe
=IF(ABS(A2-B2)/B2>0.02,"FALSE","TRUE")

But note that the results may differ dependent on whether A2 or B2 is the divisor, you may want to nest another If round this to use a different version depending on which col is the greater/smaller.

Brian
 
Last edited:
Just to expand on this take the 2 numbers 1000 and 980

1000 is within 2% of 980 as 20% of 1000 is 20
But
980 is not within 20% of 1000 as 20% of 980 is 19.6 = 999.6

so maybe more thought is required.

Brian
 
BTW being a bit nosey looked at you code for the spreadsheet circa 2008, if you are still using it and the values change from time to time instead of all those Case statements try

wsname=cells(i,"J")

and Worksheets(wsname)

will save all the hardwork.

Brian
 
BTW being a bit nosey looked at you code for the spreadsheet circa 2008, if you are still using it and the values change from time to time instead of all those Case statements try

wsname=cells(i,"J")

and Worksheets(wsname)

will save all the hardwork.

Brian

Don't think this reply was meant for this question - LOL
 

Users who are viewing this thread

Back
Top Bottom