I'm looking for advice on how to add a range to an IF statement. I want to compare to cells for instance, A1 and B1; if B1 is within at most -5 (the figure being more than A1 is not a problem) of A1, then cell C1 would return the message GOOD. At the moment I am using the CountIF function;
=IF(COUNTIF(D1:D100,B1)>0,"GOOD","BAD")
D1:D100 represents the range;
=(A1-5), =(A1-4)... =(A1+1)... =(A1+100)...
And so forth.
This works when B1 is a static number but within the spreadsheet I am using B1 is calculated by four variable numbers chosen by the user from drop down menus. (data validation)
B1=100*(F1+F2+F3+F4)/4
Where the F1:F4, are the variable numbers. For Example F1 could equal 10 or 5 dependant on the drop down choice.
Using the initial forumula in this manner will only return "BAD" into Cell C1, irrespective of whether B1 is within the determined range.
Does anybody have an idea how to fix this problem, or a more suitable formula to use? (Possibly a VLOOKUP?)
Bookmarks