I would like to create a custom function for use within an IF(AND(OR . . . formula, but I have no idea how to convert specific cell references into generic form or how to refer to cells in the preceding row, or in fact if what I'm trying to achieve is even practicable; maybe I've totally misunderstood the use of custom functions. As a last resort I can always just copy/paste the code block, but I'm hoping that a custom function would be neater.
The following block (within the outer brackets) has to be repeated several times within the formula in cell E2:
OR( AND(A1>A2,B1>B2,A1>B1), AND(A1>A2,B1<b2,a1>B2), AND(A1<a2,b1<b2,a2>B2), AND(A1<a2,b1>B2,A2>B1) )
Can that be made into a function and if so, how do I then use the function within the formula? For example, a simple version of the formula in cell E2 would be:
IF(AND(M2="RG",N2="Yes",OR( Custom function ) ),"Proceed","Hold")
Guidance on this will be much appreciated as I'm currently lost.</a2,b1></a2,b1<b2,a2></b2,a1>
The following block (within the outer brackets) has to be repeated several times within the formula in cell E2:
OR( AND(A1>A2,B1>B2,A1>B1), AND(A1>A2,B1<b2,a1>B2), AND(A1<a2,b1<b2,a2>B2), AND(A1<a2,b1>B2,A2>B1) )
Can that be made into a function and if so, how do I then use the function within the formula? For example, a simple version of the formula in cell E2 would be:
IF(AND(M2="RG",N2="Yes",OR( Custom function ) ),"Proceed","Hold")
Guidance on this will be much appreciated as I'm currently lost.</a2,b1></a2,b1<b2,a2></b2,a1>