# Combinating Formulas



## John 4348 (Dec 27, 2022)

Hello everyone
I need to combine 2 Formulas so that when Two first columns have values, the Result is true, and when Four Columns have values the Result is true also.
Thanks in advance


----------



## jdellasala (Dec 27, 2022)

Just put them into an IF statement.

```
IF(Situation=TRUE, LongFormulaOne, LongFormula2)
```


----------



## John 4348 (Dec 27, 2022)

jdellasala said:


> Just put them into an IF statement.
> 
> ```
> IF(Situation=TRUE, LongFormulaOne, LongFormula2)
> ```


Please write the Formula completely.


----------



## jdellasala (Dec 27, 2022)

John 4348 said:


> Please write the Formula completely.


You first. You have the source of the picture. I'm not good at transcribing!


----------



## Joe4 (Dec 27, 2022)

John 4348 said:


> Please write the Formula completely.


If you want someone to edit your formulas, you need to post them in a manner that they can easily be copy and pasted!
Posting images does not make that possible. 
You shouldn't expect someone to manually type out your long formulas because you did not post them in a usuable format.


----------



## John 4348 (Dec 27, 2022)

Joe4 said:


> If you want someone to edit your formulas, you need to post them in a manner that they can easily be copy and pasted!
> Posting images does not make that possible.
> You shouldn't expect someone to manually type out your long formulas because you did not post them in a usuable format.


Excuse me.
I tried the Formula. when Four Columns have values, it is correct, but when Columns 3&4 are blank, it is incorrect.


----------



## John 4348 (Dec 27, 2022)

John 4348 said:


> Excuse me.
> I tried the Formula. when Four Columns have values, it is correct, but when Columns 3&4 are blank, it is incorrect.


So I pleased to write it.


----------



## Joe4 (Dec 27, 2022)

John 4348 said:


> Excuse me.
> I tried the Formula. when Four Columns have values, it is correct, but when Columns 3&4 are blank, it is incorrect.


We are asking you to simply copy/paste the formula to a post in plain simple text mode (and not an image), so we can copy/paste the formula so we do not have to write the whole thing out again manually (don't make it hard for people to help you!).

Please post the formula you just tried that didn't work out, so we can analyze it.  It sounds like the issue is how you set up your condition (the "Situation" part of the formula).

You may also have to post an example of one that does not work properly, explaining which four columns you are looking at (as there are more than four columns being referenced in your formula).
Remember, we know nothing about your data, your problem, and what you are trying to accomplish.
So you need to supply all the important details so we can help you.


----------



## John 4348 (Dec 27, 2022)

Here they are.
           Formula1 =(CEILING(IF(AND(D2=97);(E2*2)/2;IF(E2=97;(D2*1)/1;(D2+E2*2)/3));0.25))

          Formula 2  =(CEILING(IF(AND(D2=97;E2=97);(F2+G2*2+F2+G2*4)/8;IF(D2=97;(F2+E2*2+F2+G2*4)/8;IF(E2=97;(D2+G2*2+F2+G2*4)/8;(D2+E2*2+F2+G2*4)/8)));0.25))


----------



## jdellasala (Dec 27, 2022)

John 4348 said:


> Here they are.
> Formula1 =(CEILING(IF(AND(D2=97);(E2*2)/2;IF(E2=97;(D2*1)/1;(D2+E2*2)/3));0.25))
> 
> Formula 2  =(CEILING(IF(AND(D2=97;E2=97);(F2+G2*2+F2+G2*4)/8;IF(D2=97;(F2+E2*2+F2+G2*4)/8;IF(E2=97;(D2+G2*2+F2+G2*4)/8;(D2+E2*2+F2+G2*4)/8)));0.25))


Still not clear on what conditions have to be met for either formula, but a generalized version is:

```
IF( WhateverConditionIsMet, 
CEILING(IF(AND(D2=97);(E2*2)/2;IF(E2=97;(D2*1)/1;(D2+E2*2)/3));0.25), 
CEILING(IF(AND(D2=97;E2=97);(F2+G2*2+F2+G2*4)/8;IF(D2=97;(F2+E2*2+F2+G2*4)/8;IF(E2=97;(D2+G2*2+F2+G2*4)/8;(D2+E2*2+F2+G2*4)/8)));0.25))
```
The parenthesis around each formula isn't needed (but I get why you did that!). The shorter formula will be executed when the "WhateverConditionIsMet" formula evaluates to TRUE (or any non Zero number). The longer formula will execute when that condition is not met.


----------



## John 4348 (Dec 27, 2022)

Hello everyone
I need to combine 2 Formulas so that when Two first columns have values, the Result is true, and when Four Columns have values the Result is true also.
Thanks in advance


----------



## John 4348 (Dec 27, 2022)

jdellasala said:


> Still not clear on what conditions have to be met for either formula, but a generalized version is:
> 
> ```
> IF( WhateverConditionIsMet,
> ...


thank you very much.


----------



## Joe4 (Dec 27, 2022)

Please note that when marking a post as the solution, please mark the post that actually answered the question (not your own post acknowleding that another post was the solution).
I went ahead and updated that for you.


----------



## John 4348 (Dec 27, 2022)

Joe4 said:


> Please note that when marking a post as the solution, please mark the post that actually answered the question (not your own post acknowleding that another post was the solution).
> I went ahead and updated that for you.


Thank you.
That's kind of you.


----------

