Can I place Multiple formulas in the same cell?

marcsalazar

New Member
Joined
Dec 13, 2014
Messages
4
Example:
=IF(D5>39,"Y"," ")or=IF(G5,L5,Q5:Q>9,"Y"," ")

I am trying to get the cell to display a "Y" if one of two conditions are met

Don't know if I can use the term "OR" where I have it, but it explains what I need to do.

The first condition is if a single cell has a number greater than 39

The second condition is if one of multiple cells contains a number greater than 9

I am a High School Athletic Director trying to establish a spreadsheet to track students participation points for earning their letter. Letters are earned through total points or making a varsity team.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The basic structure of an IF statement is IF(condition, value_when_true, value_when_false)

condition can be any formula that evaluates to either TRUE or FALSE.

In words, it sounds like you want "Y" when either (D5>39) or (G5>9) or (L5>9) or (Q5>9)

The OR function will return a TRUE or a FALSE with the formula

=OR(D5>39, G5>9, L5>9, Q5>9)

so the IF statement you want would be

=IF(OR(D5>39, G5>9, L5>9, Q5>9), "Y", "")
 
Upvote 0
so the IF statement you want would be

=IF(OR(D5>39, G5>9, L5>9, Q5>9), "Y", "")[/QUOTE]

Thank you so much!!! It does exactly what I need!
 
Upvote 0
When I put in the formula, =IF(OR(D5>39, G5>9, L5>9, Q5>9), "Y", ""), it works, initially. After I enter the formula if I make a mistake and put the value of "10" in cell D5 and then delete the "10" and leave D5 blank, "Y" will still appear in the formula cell, it is at that point that I must put a value in D5 that is >9. So I'll need those cells to have a value in it after the initial value is placed in it.

I'd be happy to send you a copy of the form if you'd like to take a look at it? It works this way I just will have to place "0's" is all of those cells.

Thanks for your advice!!
 
Upvote 0
Hi,

First let me make sure we understand each other, the formula mike suggested:

=IF(OR(D5>39, G5>9, L5>9, Q5>9), "Y", "")

will return a "Y" if ANY of the conditions are True, e.g. D5>39, G5>9, L5>9, Q5>9, that would mean if D5 is less than 40 or Blank, if ANY of the other conditions are True, you'll get a "Y",
it also means that if All of the cells are Blank except, say, Q5 is 10, you'll get a "Y".

Is this what you need?, otherwise, give an example of what values you have in each of these cells and what you expect the outcome to be.
I'm guessing maybe you meant D5>39 "AND" either G5, or L5, or Q5 needs to be >9, if so try:

=IF(AND(D5>39,OR(G5>9, L5>9, Q5>9)), "Y", "")
 
Upvote 0
Mike's formula worked but there was a "quirk" to it. The goal is to manage a points system in which when a student reaches a certain point total (40) they will earn their athletic letter. So it is possible to earn a letter without playing at the varsity level by playing multiple sports at lower levels for a couple of years. However, if a student plays at the varsity level before earning the total of 40 points they will earn 10 points for that sport and their letter before getting the full 40 points.

So, we need a "Y" if they get to 40 points, they also need a "Y" if they earn 10 points in a single catagory.

The issue with the formula if I make a mistake and put "10" in G5 the formula cell will display "Y" when I blank the cell the 'Y" remains. I must enter a number between 0 - 9 to make the "Y" disappear.
 
Upvote 0
I think the quirk is generated by Excel trying to compare "" with a number. Try

=IF(OR(D5+0>39, G5+0>9, L5+0>9, Q5+0>9), "Y", "")

Which will error if non-numeric text is made in any of the cells.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,202
Members
448,554
Latest member
Gleisner2

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