Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 185
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
use value not formula in IF statement Soz Excel Worksheet Functions 2 May 10th 07 07:54 PM
IF THEN statement - Formula walkerT Excel Discussion (Misc queries) 3 March 13th 07 07:20 PM
IF statement formula JaB Excel Worksheet Functions 4 September 15th 06 04:12 PM
Can I use IF statement with a formula? Michael NYC Excel Worksheet Functions 1 October 1st 05 04:45 AM
If statement formula lintan Excel Worksheet Functions 6 November 22nd 04 10:29 PM


All times are GMT +1. The time now is 11:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"