# Two Formulas in one cell

1. ## Two Formulas in one cell

I have a problem I have been trying to sort but with no success.
On the sheet that is attached I have a SUBPRODUCT formula that is in row 18 that produces 2 if correct in row 12
There is another SUBPRODUCT FORMULA IN ROW 20 that produces 5 if correct,
What I want is if the formulas in row 20 produce 5 then the rows 18 produce 0 instead of 2,
I have made it sound more complicated than it is .but the attachment will help

Thank you for any input John

2. ## Re: Two Formulas in one cell

Hi John and welcome

You can 'nest' the SUMPRODUCT inside an IF that checks the value in row 20 first. So the below formula would go in C18 and be copied across.
Formula:
`Please Login or Register  to view this content.`

The red part is your current formula in C18.

That will show 0 in row 18 if row 20 contains 5 and will calculate the SUMPRODUCT if not.

Does that help?

BSB

3. ## Re: Two Formulas in one cell

Thank you so much for replying.
I think your formula is nearly what I want.
I still want Row 18 to show 2 if row 20 is incorrect
On my attachment there is a second page so you can work on please

Kind regards John

4. ## Re: Two Formulas in one cell

I've amended the formulas on the "Super 6" sheet in the attached version.
See if that does what you need.

BSB

5. ## Re: Two Formulas in one cell

Thanks so much
That is absolutely great,
Dont know how you do it, I need more lessons John

6. ## Re: Two Formulas in one cell

It's only easy when you know how, John!

You can learn all you need to know by asking questions on the forum. We're here to help you learn.

BSB

7. ## Re: Two Formulas in one cell

Hello BSB, I am new to this forum and was surprised how quick you answered my problem, I did not explain it very well but you sorted it for me straight away. I will try and remember all that you sorted out.
How did you learn to be so good?
Thanks once again John

8. ## Re: Two Formulas in one cell

Quite simply, necessity and years of practice. I found myself with a job that meant I was using Excel all the time. I'm often a little lazy so spent time learning a few little tricks in Excel to make my worklife easier. Litte tricks lead to more complicated tricks and now after two decades of using Excel the learned tricks mean I write code to automate repetetive tasks.

Your original request here was quite a simple fix, but as I said earlier, only easy when you know how. I've been running football competitions like this for years so I understood what you needed and how to help.

It's actually a very simple program to learn to use once you understand a few of the basics. Start small and ask questions when you get stuck and it will all fall into place quite quickly.

BSB

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1