Excel Search words from a cell and assign txt in another cell

Closed
kumarnc2003 Posts 1 Registration date Saturday March 2, 2013 Status Member Last seen March 2, 2013 - Mar 2, 2013 at 12:56 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 4, 2013 at 12:34 PM
Hello,

I am having data like whi below:

A B

1. customer1 TV
Fridge
Microwave

2. customer2 TV

3. customer3 Fridge
Microwave

4. customer4 TV
Fridge

All are in single Row(Eg. TV, Fridge, Microwave).

My requirement is to search a word and assign a word in another column say C.
If a customer purchases 3 items he needs to to get 20% off on MRP and 2 products means 10% and if single product no discount.

Can any one help me in this using a excel formula.

Thanks in advance. Speed response is appreciated as it is urgent.



1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Mar 4, 2013 at 12:34 PM
Kumanrc,

You could count the number of comma's:
=IF(ISERROR(SEARCH(",",B1)),"0%",IF(ISERROR(SEARCH(",",B1,SEARCH(",",B1)+1)),"10%","20%"))

Hopefully I was urgent enough.

Best regards,
Trowa
0