if function multiple conditions

harky

Active Member
Joined
Apr 8, 2010
Messages
411
Office Version
  1. 365
  2. 2024
Platform
  1. Windows
i need some help one If

If P.33 = 0.33
if P.34 = 0.34
if P.5 = 0.5
if P = 1

below is my exiting one but i wan to put as above..
=IF(G5="P", "1", "0")
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
oh i think i found the ans.

=
IF(G5="P","1",
IF(G5="P.5","0.5",
IF(G5="P.34","0.34",
IF(G5="P.33","0.33",
"0"))))


if there is better way.. ppls let me know
 
Upvote 0
Maybe:
Book2
AB
1P.330.33
2P.340.34
3P.50.5
4P1
5G.540
Sheet2
Cell Formulas
RangeFormula
B1:B5B1=IF(A1="P",1,--TEXTAFTER(A1,"P",,,,0))
 
Upvote 0
Try.
Excel Formula:
=IFERROR(INDEX({"1","0.5","0.34","0.33"},MATCH(G5,{"P","P.5","P.34","P.33"},0)),0)
For 365 version.
If lookup values are in G5:G9, result is required in H column then in H5 (dynamic formula)
Excel Formula:
=IFERROR(INDEX({"1","0.5","0.34","0.33"},MATCH(G5:G9,{"P","P.5","P.34","P.33"},0)),0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,226,101
Messages
6,188,918
Members
453,511
Latest member
Refugar

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