SOLVED

If Function

Brass Contributor

Dear Everyone,

 

Please suggest me a formula for the following excel:

 

 ABCDEF
1ParticularsCriteria 1Result Criteria 2Result
2101010If A2 starts with 1, C2 will show BSBS If A2 starts with 1, F2 will show ASSETASSET
3201010If A3 starts with 2, C3 will show BSBS If A3 starts with 2, F3 will show LIABILITYLIABILITY
4301010If A4 starts with 3, C4 will show PLPL If A4 starts with 3, F4 will show INCOMEINCOME
5401010If A5 starts with 4, C5 will show PLPL If A5 starts with 4, F5 will show EXPENSEEXPENSE

 

Thanks in advance.

2 Replies
best response confirmed by Oliullah_Siddique (Brass Contributor)
Solution

@Oliullah_Siddique In C2 you could use:

=CHOOSE(LEFT(A2),"BS","BS","PL","PL")

and in F2:

=CHOOSE(LEFT(A2),"ASSET","LIABILITY","INCOME","EXPENSE")

 Copy down

Thanks a lot. Your function worked very well @Riny_van_Eekelen.
1 best response

Accepted Solutions
best response confirmed by Oliullah_Siddique (Brass Contributor)
Solution

@Oliullah_Siddique In C2 you could use:

=CHOOSE(LEFT(A2),"BS","BS","PL","PL")

and in F2:

=CHOOSE(LEFT(A2),"ASSET","LIABILITY","INCOME","EXPENSE")

 Copy down

View solution in original post