I have multiple products that have a certain price associated with them depending on what product group they belong to. Their product group is identified by a 2 letter prefix in the Product Title. I want to say, if the Product Title cell contains "AB", then Price = the AB Group Price. It would be easier to have a column that solely contains the product group associated with that row of data, but for multiple external reasons I cannot do that - the only way to identify the product group is from inside the Product Title.
I tried the following function, which let me alter between Group Prices of AB and DC -but it will not allow me to put any more optional value conditions/results (unless I'm doing something wrong):
=IF(COUNT(SEARCH("AB",'A2')),$E$2,IF(COUNT(SEARCH("DC",'A2'),1),$E$3))
Does anyone know what function would suit this? Thanks in advance.
[TABLE="class: grid, width: 580"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]Product Title[/TD]
[TD]Price[/TD]
[TD][/TD]
[TD]Product Group[/TD]
[TD="align: center"]Group Price[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]AB - Product 1[/TD]
[TD][/TD]
[TD][/TD]
[TD]AB[/TD]
[TD="align: center"] $3.45[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]AB - Product 2[/TD]
[TD][/TD]
[TD][/TD]
[TD]DC[/TD]
[TD="align: center"]$7.00[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]AB - Product 3[/TD]
[TD][/TD]
[TD][/TD]
[TD]EF[/TD]
[TD="align: center"] $7.00[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]CD - Product 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]CD - Product 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD]CD - Product 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]EF - Product 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD]EF - Product 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD]EF - Product 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I tried the following function, which let me alter between Group Prices of AB and DC -but it will not allow me to put any more optional value conditions/results (unless I'm doing something wrong):
=IF(COUNT(SEARCH("AB",'A2')),$E$2,IF(COUNT(SEARCH("DC",'A2'),1),$E$3))
Does anyone know what function would suit this? Thanks in advance.
[TABLE="class: grid, width: 580"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD]Product Title[/TD]
[TD]Price[/TD]
[TD][/TD]
[TD]Product Group[/TD]
[TD="align: center"]Group Price[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]AB - Product 1[/TD]
[TD][/TD]
[TD][/TD]
[TD]AB[/TD]
[TD="align: center"] $3.45[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]AB - Product 2[/TD]
[TD][/TD]
[TD][/TD]
[TD]DC[/TD]
[TD="align: center"]$7.00[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]AB - Product 3[/TD]
[TD][/TD]
[TD][/TD]
[TD]EF[/TD]
[TD="align: center"] $7.00[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]CD - Product 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD]CD - Product 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD]CD - Product 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD]EF - Product 1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD]EF - Product 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD]EF - Product 3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]