First Row is a header, so it should NOT be changed/disturbed.
Data Range is from Column A to O, and row data could vary from 50 to 500
Column P is just a separator and has no data.
Column, I, K, M, has Numeric data which needs to be compared.
I Need a VBA MACRO Code that could fill in RELATIVE Excel Formula (R1C1 style) through VBA Macro Code in every 4th cell in Column Q, and Column R in such way that there is data in adjacent Column M till end (XL Down)
Part -1 : Here just code is reqd., as formula is correct
cOLUMN Q, starting with 4th row i.e. Cell Q4 should have following formula, and every 4th cell thereafter like Q8, Q12 and so on till there is data till end in Column M
=IF(AND((I2/I1)>=1,(K2/K1)>=5.5,(M2/M1)>=5),ROUND((K2/K1),2)&" ABC",IF(AND(ABS((I2/I1)-1)<=1,(K2/K1)>=5.5,(M2/M1)>=5),ROUND((K2/K1),2)&" PQR","Ignore"))
Part -2: Here I need help for building formula also, but same should be filled as above required above but in Column R, (in above step it was for Column Q)
COLUMN R, starting with 4th row i.e. Cell R4 should have following formula, and every 4th cell thereafter like R8, R12 and so on till there is data till end in Column M
The formula for conditions given below should be single formula
Condition1: IF K4>(K3*5), and K3>(K2*5), and K2(K1*5),
IF ALL Above conditions are true, "TUV"
Condition2: IF K4>K3, AND K3>K2 AND K2>K1 AND ALSO I4>I3, AND I3>I2, AND I2>I1
IF ALL ABOVE Codnitions given in 2 here, is true, "EFG"
Condition3: IF K4<(K3*2), AND K3<(K2*2), ANd K2<(K1*2)
IF ALL ABOVE CODNTIONS given in 3 here, is true, "TUV"
Codnition 4: IF K4<K3, AND K3<K4, AND K2<K1 AND ALSO I4>I3, AND I3>I2, AND I2> I1
IF ALL ABOVE COnditions given in 4 here, is True, "123"
If none of the conditions 1 to 4 of Part 2 above is met, say, "IGNORE"
Bookmarks