Hi folks,
Could anyone help me translate the following Excel formula to VBA:
=IF(NETWORKDAYS(B5;B5)=0;0;IFERROR(INDEX(CS;MATCH(C5;CS_Position;0);MATCH(B5;CS_Date;1));IFERROR(INDEX(EC;MATCH(C5;EC_Position;0);MATCH(B5;EC_Date;1));IFERROR(INDEX(FI;MATCH(C5;FI_Position;0);MATCH(B5;FI_Date;1));IFERROR(INDEX(PA;MATCH(C5;PA_Position;0);MATCH(B5;PA_Date;1));IFERROR(INDEX(UTE;MATCH(C5;UTE_Position;0);MATCH(B5;UTE_Date;1));"Not found"))))))
Where:
-CS, CS_Position, EC, EC_Position, etc. are referenced names I put in Excel.
-B5, C5 are my cells in Excel.
Recording a macro did not give probing results.
Any thoughts?
Any help is appreciated!
JayEm
Could anyone help me translate the following Excel formula to VBA:
=IF(NETWORKDAYS(B5;B5)=0;0;IFERROR(INDEX(CS;MATCH(C5;CS_Position;0);MATCH(B5;CS_Date;1));IFERROR(INDEX(EC;MATCH(C5;EC_Position;0);MATCH(B5;EC_Date;1));IFERROR(INDEX(FI;MATCH(C5;FI_Position;0);MATCH(B5;FI_Date;1));IFERROR(INDEX(PA;MATCH(C5;PA_Position;0);MATCH(B5;PA_Date;1));IFERROR(INDEX(UTE;MATCH(C5;UTE_Position;0);MATCH(B5;UTE_Date;1));"Not found"))))))
Where:
-CS, CS_Position, EC, EC_Position, etc. are referenced names I put in Excel.
-B5, C5 are my cells in Excel.
Recording a macro did not give probing results.
Any thoughts?
Any help is appreciated!
JayEm