Need Excel formula to Pick value based on conditions

Aswinraj

Board Regular
Joined
Dec 10, 2015
Messages
65
Hi Friends,

I wonder whether any formulas available for changing the data based on certain conditions.

Example Based on Below Table:

If Last 3 Letters in Column B is "mer" and Column A is "9G" then in Column C - it has to give as "SG"
else it has to give the same data in Column A.


Column AColumn B
9GConsumer
9TMobility
FFMobility
8N

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
TA

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
MP

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
B6U

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
B8J

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
BAN

<tbody>
</tbody>
Commer

<tbody>
</tbody>
9G

<tbody>
</tbody>
Commer

<tbody>
</tbody>
BFF

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
BAN

<tbody>
</tbody>
Commer

<tbody>
</tbody>
BGB

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
9G

<tbody>
</tbody>
Commer

<tbody>
</tbody>
BTA

<tbody>
</tbody>
Commercial

<tbody>
</tbody>
9G

<tbody>
</tbody>
Consumer

<tbody>
</tbody>
BFD

<tbody>
</tbody>
Commer

<tbody>
</tbody>

<tbody>
</tbody>
 
In C2 of Sheet2 control+shift+enter, not just enter, and copy down:

=INDEX(Sheet1!$C$2:$C$5,MATCH($A2,IF(Sheet1!$B$2:$B$5=$B2,Sheet1!$A$2:$A$5),0))
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,215,488
Messages
6,125,092
Members
449,206
Latest member
ralemanygarcia

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top