Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This has got me really scratching my head.
I have the following formula in a table: =IF(B26=25,"",IF(G5=G50,"YES","")) The problem is thatt B26 is less than 25 (8), and so the answer comes up blank. But if I change the formula to: =IF(B26<=25,"",IF(G5=G50,"YES","")) Then the cell will say, "YES." What am I doing wrong? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Well, what do you want to happen if B26 is less than 25?
Pete On Dec 20, 12:50 am, Peter wrote: This has got me really scratching my head. I have the following formula in a table: =IF(B26=25,"",IF(G5=G50,"YES","")) The problem is thatt B26 is less than 25 (8), and so the answer comes up blank. But if I change the formula to: =IF(B26<=25,"",IF(G5=G50,"YES","")) Then the cell will say, "YES." What am I doing wrong? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If B26 is <25, then the word YES will show up in the cell.
On Wed, 19 Dec 2007 16:58:30 -0800 (PST), Pete_UK wrote: Well, what do you want to happen if B26 is less than 25? Pete On Dec 20, 12:50 am, Peter wrote: This has got me really scratching my head. I have the following formula in a table: =IF(B26=25,"",IF(G5=G50,"YES","")) The problem is thatt B26 is less than 25 (8), and so the answer comes up blank. But if I change the formula to: =IF(B26<=25,"",IF(G5=G50,"YES","")) Then the cell will say, "YES." What am I doing wrong? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Dec 19, 6:24 pm, Peter wrote:
If B26 is <25, then the word YES will show up in the cell. What you wrote previously is effectively: =if(and(B26<25,G25=50), "YES", "") Are you trying to write: =if(or(B26<25,G25=50), "YES", "") ----- previous posting ----- On Dec 20, 12:50 am, Peter wrote: This has got me really scratching my head. I have the following formula in a table: =IF(B26=25,"",IF(G5=G50,"YES","")) The problem is thatt B26 is less than 25 (8), and so the answer comes up blank. But if I change the formula to: =IF(B26<=25,"",IF(G5=G50,"YES","")) Then the cell will say, "YES." What am I doing wrong? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
PS....
On Dec 19, 4:50 pm, Peter wrote: if I change the formula to: =IF(B26<=25,"",IF(G5=G50,"YES","")) Then the cell will say, "YES." What am I doing wrong? If that is what you want, then perhaps you made only two mistakes in your second effort. Perhaps you wanted the following: =if(B26<25, "YES", if(G5=G50, "YES", "")) Note: "<25", not "<=25". Generally, that is equivalent to the IF(OR(...),...) formula that I suggested. Arguably, one advantage of your second formulation is that it will return "YES" if B26 is less than 25, even if G5 contains an error. I would prefer to avoid any hypothetical errors in G5. But to each his own. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What I want is if B26 is greater than or equal to 25 then nothing
appears in the cell. Then if G5 is greater than or equal to G50, then I want the word YES to appear in the cell. Note: "<25", not "<=25". Isn't <= how you write "less than or equal to?" On Wed, 19 Dec 2007 20:01:29 -0800 (PST), joeu2004 wrote: PS.... On Dec 19, 4:50 pm, Peter wrote: if I change the formula to: =IF(B26<=25,"",IF(G5=G50,"YES","")) Then the cell will say, "YES." What am I doing wrong? If that is what you want, then perhaps you made only two mistakes in your second effort. Perhaps you wanted the following: =if(B26<25, "YES", if(G5=G50, "YES", "")) Note: "<25", not "<=25". Generally, that is equivalent to the IF(OR(...),...) formula that I suggested. Arguably, one advantage of your second formulation is that it will return "YES" if B26 is less than 25, even if G5 contains an error. I would prefer to avoid any hypothetical errors in G5. But to each his own. |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Dec 19, 9:34 pm, Peter wrote:
What I want is if B26 is greater than or equal to 25 then nothing appears in the cell. Then if G5 is greater than or equal to G50, then I want the word YES to appear in the cell. Do you mean that you want "" when B26=25, regardless of the value in G5; otherwise (when B26<25) you "YES" when G5=G50; and otherwise (when B26<25 and G5<G50) you want ""? If so, that is what your original formula does. But you said that is not giving the desired result when B26<25. In response to Pete-UK, you said: "If B26 is <25, then the word YES will show up in the cell". I interpreted "will" to mean that is what you want; that is, you want "YES" when B26<25 as well as when G5G50. Before you can write an IF expression correctly, you need to fully specify your requirements, taking all combination of conditions into account. English description can be ambiguous. One way to do that is to fill out the following table (sorry for any alignment problems): G5<G50 G5=G50 B5G50 ------------ ------------- ----------- B26<25 xxx xxx xxx B26=25 xxx xxx xxx B2625 xxx xxx xxx Replace "xxx" with the desired result, "YES" or "". Some of those combination might become redundant and reducible after you fill in the table. Note: "<25", not "<=25". Isn't <= how you write "less than or equal to?" Yes. But in your original posting, you wrote that the problem arises when "B26 is less than 25". "Less than" (<) is the opposite of "greater than or equal" (=), not "less than or equal" (<=). |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That's what the first formula of your original message does:
=IF(B26=25,"",IF(G5=G50,"YES","")) What is your problem? What are your values in B26, in G5, and in G50? What result does it give, and what result did you expect? Note that you haven't specified in your words below what you want if B26<25 and G5<G50, and the formula gives an empty string. If you want something different, then =IF(B26=25,"",IF(G5=G50,"YES","whatever alternative result you want")) -- David Biddulph "Peter" wrote in message ... What I want is if B26 is greater than or equal to 25 then nothing appears in the cell. Then if G5 is greater than or equal to G50, then I want the word YES to appear in the cell. .... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|