I am currently using excel to simulate some hardware control logic for a processor (for a class). I am only using four formulae: If(), Or(), And() and string operations MID(). I am trying to convert these nested excel formulas into C/Java style syntax. eg:

`If(OR(AND(A1=1,B1=2),AND(C1=,D1=3)))`

becomes

`if((A1 == 1 && B1 == 2)||(C1 == 1 && D1 == 2))`

Does excel have any built in converters for such purpose?

I know that it is possible using complex regex, but I much rather find a simpler approach for this issue.