Thanks for your reponse Mr. Jeff,
I am applying formula through vba macros recording something like this
Sub FillDown()
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Range("G2:G" & LR).Formula = "=IF(AND(RC[-5]<>""M"",RC[-5]<>""F""), ""Only 1 letter (M or F) is allowed as gender"", IF(NOT(OR(RC[-4]=""VIP"",RC[-4]=""A"",RC[-4]=""B"",RC[-4]=""C"")), ""Only VIP, A, B & C is allowed in class"", IF(NOT(AND(ISNUMBER(RC[-3]), RC[-3]>=0, RC[-3]<=999)), ""Only 3 characters or numeric values are allowed in Age"", IF(NOT(ISNUMBER(SEARCH(RC[-2], ""EMPLOYEESPOUSECHILD"")" & "Employee, Spouse or child is allowed in this column"", IF(NOT(ISNUMBER(SEARCH(RC[-1], ""African, Asian, Middle East, Saudi, Other""))), ""African, Asian, Middle East, Saudi & Other is allowed in this column"", """")))))"
'"=Today()"
End Sub
But it is giving me an error saying "Application-defined or object-defined error".
---------- Post added at 07:04 AM ---------- Previous post was at 07:00 AM ----------
Just now i have tested my formula though vba recording it is displaying the same error.
FORMULA:
=IF(AND(B2<>"M",B2<>"F"), "Only 1 letter (M or F) is allowed as gender", IF(NOT(OR(C2="VIP",C2="A",C2="B",C2="C")), "Only VIP, A, B & C is allowed in class", IF(NOT(AND(ISNUMBER(D2), D2>=0, D2<=999)), "Only 3 characters or numeric values are allowed in Age", IF(NOT(ISNUMBER(SEARCH(E2, "EMPLOYEESPOUSECHILD"))), "Employee, Spouse or child is allowed in this column", IF(NOT(ISNUMBER(SEARCH(F2, "African, Asian, Middle East, Saudi, Other"))), "African, Asian, Middle East, Saudi & Other is allowed in this column", "")))))
Bookmarks