=IF((OR([Invoice 1 Status (Dropdown)]@row = "Credit Memo Required" AND ([TYPE of Credit] NOT(Rebill-Invoice Error))), =[Invoice 1 Amount]@row), (IF(OR([Invoice 2 Status (Dropdown)]@row = "Credit Memo Required" AND ([TYPE of Credit] NOT(Rebill-Invoice Error))), =[Invoice 2 Amount]@row), (IF(OR([Invoice 3 Status (Dropdown)]@row = "Credit Memo Required" AND ([TYPE of Credit] NOT(Rebill-Invoice Error))), =[Invoice 3 Amount]@row), (IF(OR([Invoice 4 Status (Dropdown)]@row = "Credit Memo Required" AND ([TYPE of Credit] NOT(Rebill-Invoice Error))), =[Invoice 4 Amount]@row), (IF(OR([Invoice 5 Status (Dropdown)]@row = "Credit Memo Required" AND ([TYPE of Credit] NOT(Rebill-Invoice Error))), =[Invoice 5 Amount]@row), (IF(OR([Invoice 6 Status (Dropdown)]@row = "Credit Memo Required" AND ([TYPE of Credit] NOT(Rebill-Invoice Error))), =[Invoice 6 Amount]@row)))))))
The Credit amount will essentially be equal to the Invoice amount when the 'Invoice Status dropdown' at the row is equal to Credit memo required AND when the 'Type of Credit'} is NOT ('Rebill-Invoice Error').