If cell contains multiple text how to add other cell value?

Solved/Closed
Iza - Dec 3, 2021 at 05:04 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Dec 13, 2021 at 11:26 AM
Hello,

I am struggeling with my excel sheet and need help. I will rather give it in an example.

A1 and B1 contains a price, C1 contains three seperate text rules and D1 is where i struggle.

This is what I would like to do.
If the text in cell C1 is A it should add Cell A1's price in cell D1 as a minus, if C1 is B it should add Cell B1's price in cell D1, if C1 is AB it should add Cell B1's price ÷ 2 in cell D1.

Example:
A1 B1 C1 D1
$1.00 $0.76 A -$1.00
$1.00 $0.76 B $0.76
$1.00 $0.76 AB $0.38.

I do hope my explanation makes sense.

Regards
Iza

System Configuration: Android / Chrome 96.0.4664.45
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Dec 13, 2021 at 11:26 AM
Hi Iza,

Give the following formula a try:
=IF(C1="A",A1*-1,IF(C1="B",B1,IF(C1="AB",B1/2,"")))

Best regards,
Trowa
0