Forum Discussion
TheFireman408
May 19, 2021Copper Contributor
Help with (if or) formula in Excel with 3 options (read below)
The Excel cell will have 3 possible results...... "BLUE", "RED", or if it is left Blank/empty. When BLUE is used, multiply by 2. When RED is used, just return 1 (i.e. no math function, just u...
- May 19, 2021
=IF(A1="","",IF(A1="RED",1,IF(A1="BLUE",2*B1,"?")))
If you have Excel 2019 or Excel in Microsoft 365, you can also use
=IFS(A1="",""A1="RED",1,A1="BLUE",2*B1,TRUE,"?")
HansVogelaar
May 19, 2021MVP
If A1 is "BLUE", A1*2 makes no sense, you cannot multiply a word with 2.
What exactly do you want to multiply?
- TheFireman408May 19, 2021Copper ContributorColumn A = Color (Blue, Red, Blank)
Column B = Number of locations (0 - 100)
Column C = Formula
So this could look like .....
A1 = Blue
B1 = 6
C1 =IF((OR(A1="BLUE","RED")),B1*2,1)
C1 would populate with 12
Or .....
A1 = RED
B1 = 6
C1 =IF((OR(A1="BLUE","RED")),B1*2,1)
C1 would populate with 1
HELP:
Or .....
A1 = (blank) (i.e. no entry)
B1 = 6
C1 =IF((OR(A1="BLUE","RED")),B1*2,1)
C1 would populate with 0 (or preferably remain blank/empty, since A1 is empty)- HansVogelaarMay 19, 2021MVP
=IF(A1="","",IF(A1="RED",1,IF(A1="BLUE",2*B1,"?")))
If you have Excel 2019 or Excel in Microsoft 365, you can also use
=IFS(A1="",""A1="RED",1,A1="BLUE",2*B1,TRUE,"?")
- TheFireman408May 19, 2021Copper ContributorThis was awesome! It worked!!