![]() |
Need help with if-then statement in formula
Hello, I need to create a formula that looks in cell B2 and B3 and if either
cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
Need help with if-then statement in formula
Try this
=OR(B2=TRUE,B3=TRUE) and if you don't want it to display false try this =IF(OR(B2=TRUE,B3=TRUE),TRUE,"") Mike "mcmilja" wrote: Hello, I need to create a formula that looks in cell B2 and B3 and if either cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
Need help with if-then statement in formula
Jaret
Try =OR(B2=TRUE,B3=TRUE) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.excelusergroup.org web: www.nickhodge.co.uk "mcmilja" wrote in message ... Hello, I need to create a formula that looks in cell B2 and B3 and if either cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
Need help with if-then statement in formula
Hello Mike, thank you very much for these formulas they work like a champ if
the cell contains text! Now here's another challenge for you: what if the cells B2 and B3 are formulas that produce a "TRUE" statement which is not text. I know I can copy paste special values to change the formula to text but I'd rather not have to go through that step since the data I'm working with is constantly being updated. Again, thanks for your expertise! Jaret "Mike H" wrote: Try this =OR(B2=TRUE,B3=TRUE) and if you don't want it to display false try this =IF(OR(B2=TRUE,B3=TRUE),TRUE,"") Mike "mcmilja" wrote: Hello, I need to create a formula that looks in cell B2 and B3 and if either cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
Need help with if-then statement in formula
Hi,
I don't understand the formula work if the TRUE in B2 or B3 is the result of a formula or a text entry, what formula are you using that causes it not to work? For example in B2 =A2=1 in B3 =A3=1 These 2 formula evaluate as TRUE/FALSE if A2/A3 have a 1 in them and the formula works. Mike "mcmilja" wrote: Hello Mike, thank you very much for these formulas they work like a champ if the cell contains text! Now here's another challenge for you: what if the cells B2 and B3 are formulas that produce a "TRUE" statement which is not text. I know I can copy paste special values to change the formula to text but I'd rather not have to go through that step since the data I'm working with is constantly being updated. Again, thanks for your expertise! Jaret "Mike H" wrote: Try this =OR(B2=TRUE,B3=TRUE) and if you don't want it to display false try this =IF(OR(B2=TRUE,B3=TRUE),TRUE,"") Mike "mcmilja" wrote: Hello, I need to create a formula that looks in cell B2 and B3 and if either cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
Need help with if-then statement in formula
Hey Mike,
I'm not sure I can easily explain what I'm doing to produce the results for B2 and B3 which is really M2 and N2 on my excel worksheet but I'll give it a shot. The data in cell K2 is a router port (t1-0/0/0:1:1), cell L2 is the router status which is either (null) or #N/A (depending on the port type) and cell M2 produces "TRUE" if the status in (null) and N2 produces "TRUE" if the status is #N/A. O2 would use the formula that you provided me which will produce "TRUE" if either M2 or N2 is "TRUE". Cell M2 uses the following formula to produce a "TRUE" statement: =SUBSTITUTE(B2,"(null)","TRUE") Cell N2 uses the following formula to produce a "TRUE": =ISNA(L46) produces "TRUE" if the cell contains #N/A Example: K2 L2 M2 N2 O2 Router Port |Port Status |Status if (null) |Status if #N/A |Port Spare t1-0/0/0:1:1 |(null) |TRUE |FALSE |TRUE lsq-0/1/0.1 |#N/A |FAlSE |TRUE |TRUE Clear as mud? Thanks, Jaret "Mike H" wrote: Hi, I don't understand the formula work if the TRUE in B2 or B3 is the result of a formula or a text entry, what formula are you using that causes it not to work? For example in B2 =A2=1 in B3 =A3=1 These 2 formula evaluate as TRUE/FALSE if A2/A3 have a 1 in them and the formula works. Mike "mcmilja" wrote: Hello Mike, thank you very much for these formulas they work like a champ if the cell contains text! Now here's another challenge for you: what if the cells B2 and B3 are formulas that produce a "TRUE" statement which is not text. I know I can copy paste special values to change the formula to text but I'd rather not have to go through that step since the data I'm working with is constantly being updated. Again, thanks for your expertise! Jaret "Mike H" wrote: Try this =OR(B2=TRUE,B3=TRUE) and if you don't want it to display false try this =IF(OR(B2=TRUE,B3=TRUE),TRUE,"") Mike "mcmilja" wrote: Hello, I need to create a formula that looks in cell B2 and B3 and if either cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
Need help with if-then statement in formula
See if this works for you:
=OR(OR(M2={TRUE,"True"}),OR(N2={TRUE,"True"})) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "mcmilja" wrote in message ... Hey Mike, I'm not sure I can easily explain what I'm doing to produce the results for B2 and B3 which is really M2 and N2 on my excel worksheet but I'll give it a shot. The data in cell K2 is a router port (t1-0/0/0:1:1), cell L2 is the router status which is either (null) or #N/A (depending on the port type) and cell M2 produces "TRUE" if the status in (null) and N2 produces "TRUE" if the status is #N/A. O2 would use the formula that you provided me which will produce "TRUE" if either M2 or N2 is "TRUE". Cell M2 uses the following formula to produce a "TRUE" statement: =SUBSTITUTE(B2,"(null)","TRUE") Cell N2 uses the following formula to produce a "TRUE": =ISNA(L46) produces "TRUE" if the cell contains #N/A Example: K2 L2 M2 N2 O2 Router Port |Port Status |Status if (null) |Status if #N/A |Port Spare t1-0/0/0:1:1 |(null) |TRUE |FALSE |TRUE lsq-0/1/0.1 |#N/A |FAlSE |TRUE |TRUE Clear as mud? Thanks, Jaret "Mike H" wrote: Hi, I don't understand the formula work if the TRUE in B2 or B3 is the result of a formula or a text entry, what formula are you using that causes it not to work? For example in B2 =A2=1 in B3 =A3=1 These 2 formula evaluate as TRUE/FALSE if A2/A3 have a 1 in them and the formula works. Mike "mcmilja" wrote: Hello Mike, thank you very much for these formulas they work like a champ if the cell contains text! Now here's another challenge for you: what if the cells B2 and B3 are formulas that produce a "TRUE" statement which is not text. I know I can copy paste special values to change the formula to text but I'd rather not have to go through that step since the data I'm working with is constantly being updated. Again, thanks for your expertise! Jaret "Mike H" wrote: Try this =OR(B2=TRUE,B3=TRUE) and if you don't want it to display false try this =IF(OR(B2=TRUE,B3=TRUE),TRUE,"") Mike "mcmilja" wrote: Hello, I need to create a formula that looks in cell B2 and B3 and if either cell B2 or B3 contains "TRUE", then it returns a "TRUE". Thanks! Jaret |
All times are GMT +1. The time now is 08:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com