I am trying to figure a better method than using a Nested IF statement with 18 IFs. The below example is only 3 IFs, but my data has 18 columns of amounts. I have to assign an Account_No based on if there is a value in an Amount column. I couldn't figure out how to use VLOOKUP for this. Not sure if INDEX and MATCH will work.
The formula for AccountNo field is:
=IF(B2<>0,"12345",IF(C2<>0,23456,IF(D2<>0,34567,99999)))
I am using Excel 2013 so IFS won't work.
Any help would be appreciated. Thanks.
<tbody>
</tbody>
The formula for AccountNo field is:
=IF(B2<>0,"12345",IF(C2<>0,23456,IF(D2<>0,34567,99999)))
I am using Excel 2013 so IFS won't work.
Any help would be appreciated. Thanks.
Company | Sales | COGS | Interest | GLAccount_No |
XYZ | $5000 | $0 | $00 | 12345 |
XYZ | $0 | $600 | $0 | 23456 |
XYZ | $0 | $0 | $250 | 34567 |
XYZ | $0 | $0 | $0 | 99999 |
XYZ | $0 | $75 | $0 | 23456 |
<tbody>
</tbody>