Combining IF formulas

dempsey29

New Member
Joined
Sep 2, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have two IF formulas that I would like to combine.

If C2 = "Blue" =IF(E2="","",IF(((((((B2*(C2-2))*1.02)/(E2-1))/1.02)+(-B2))+(B2))/(B2)<0.65,"NO BET",((C2-1)/(E2-F2)*B2)))
If C2 = "Green" =IF(E3="","",IF(((((((B3*(C3-2))*1.02)/(E3-1))/1.02)+(-B3))+(B3))/(B3)<0.65,"NO BET",(C3/(E3-F3)*B3)))


The formulas are the same up until after "NO BET". I would like this to be one formula only so that I can change value C2 and it calculates correctly.

Many thanks, Alexya
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If C2 = "Blue" =IF(E2="","",IF(((((((B2*(C2-2...
I think your example is not correct, you want to put "Blue" in C2 but C2 is using it to do a subtraction.
I suppose it is another cell, I am going to put A2 and you change it to the cell you want.

VBA Code:
=IF(A2="Blue",IF(E2="","",IF(((((((B2*(C2-2))*1.02)/(E2-1))/1.02)+(-B2))+(B2))/(B2)<0.65,"NO BET",((C2-1)/(E2-F2)*B2))),"No color")
 
Upvote 0
Cross posted Combining IF statements

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Judging by the file you uploaded on EF
how about
Test.xlsx
ABCDEF
1No1No2TypeNo3No4Answer
2905blue5.50.0265.69
3905Green5.50.0282.12
Sheet1
Cell Formulas
RangeFormula
F2:F3F2=IF(D2="","",IF(((((((A2*(B2-2))*1.02)/(D2-1))/1.02)+(-A2))+(A2))/(A2)<0.65,"NO BET",IF(C2="Blue",((B2-1)/(D2-E2)*A2),IF(C2="Green",B2/(D2-E2)*A2))))
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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