# Or If Formula



## pcs614 (Dec 14, 2022)

I am looking to write a formula where I will get 2 separate results if either of the tests are true.

If a is true then 1
If b is also true then 2 
Otherwise base case
If either A or B are true it should give me 1 or 2
it's not giving me both, it's falling out after the first one is true


----------



## Fluff (Dec 14, 2022)

What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

What exactly is in A & B?


----------



## pcs614 (Dec 14, 2022)

Thanks for your response. I want to calculate my revenue using one of 3 scenarios.
C is the baseline(default, if neither A or B is true). A and B are each the base case plus an additional amount. 
I would like to be able to calculate revenue if either A or B is true or both are true. 
Is there a different way to setup the inputs?


----------



## Fluff (Dec 14, 2022)

Thanks for updating your profile. 
Unfortunately you have not answered my question about A & B, can you post some sample data showing what you have & what you are trying to do.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.


----------



## pcs614 (Dec 15, 2022)

I installed the Add in, however the mini sheets is disabled(gray)
I enabled all Macros and made the folder the file is in a trusted source. I am not sure how else to get the add in to work.
Appreciate your help


----------



## Fluff (Dec 15, 2022)

Did you right click the file & unblock it? Xl2bb got disable


----------



## pcs614 (Dec 15, 2022)

Thanks for showing me how to disable
Here is my sheet 

MrExcel.xlsxABCDEFG1AddressEstimate AEstimate BActual rentActual + Estimate AActual + Estimate BUW RENT2Property 117051705170517053Property 225002500025004Property 314000140005Property 41885188518851885678Estimate A19Estimate B1Sheet1Cell FormulasRangeFormulaE2:E5E2=D2+B2F2:F5F2=D2+C2G2:G5G2=IF($B$8>0,E2,IF($B$9>0,F2,D2))



Fluff said:


> Did you right click the file & unblock it? Xl2bb got disable


----------



## Fluff (Dec 15, 2022)

Thanks for that, what are your expected results?


----------



## pcs614 (Dec 15, 2022)

In this case where both estimates are 1(on). I want the amount for estimate B(row 3) to also show up. 
However once the IF statement gets its first 1 it falls out and stops running. 
I want if either A or B are on they should return their respective number.


----------



## Fluff (Dec 15, 2022)

But can you post your expected results for each row.


----------



## pcs614 (Dec 14, 2022)

I am looking to write a formula where I will get 2 separate results if either of the tests are true.

If a is true then 1
If b is also true then 2 
Otherwise base case
If either A or B are true it should give me 1 or 2
it's not giving me both, it's falling out after the first one is true


----------



## pcs614 (Dec 15, 2022)

I would like row 3 to show 1400


----------



## pcs614 (Dec 15, 2022)

I don't understand what your asking. Do you mean to ask what I would the formula to show, if it worked the way I wanted?


----------



## Fluff (Dec 16, 2022)

pcs614 said:


> Do you mean to ask what I would the formula to show, if it worked the way I wanted?


That's exactly what I am asking for.


----------

