Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Or's with If's Statements

I am trying to write an if statement for a range of cells, so that if any one
of the 6 cells has a certain word in them, my destination cell (where my
formula is written), will give my staff members a certain command. Is there
a way to do this with an 'if' statement, or does anyone have other
suggestions?

Any help you can give me would be much appreciated. Thank you in advance.
Shelli - Senior Accountant
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 207
Default Or's with If's Statements

Sr Accountant,
This is what I came up with:
Cells A11 thru F11 blank,
In cell G11
"=IF(ISTEXT(A11)=TRUE,1,IF(ISTEXT(B11)=TRUE,2,IF(I STEXT(C11)=TRUE,3,IF(ISTEXT(D11)=TRUE,4,IF(ISTEXT( E11)=TRUE,5,IF(ISTEXT(F11)=TRUE,6,0))))))"
This looks at each cell one at a time, if there is text in it, it outputs a
corresponding number. To change the command, depending on the response. Just
change the number to the command.
hth

"Sr Accountant" wrote:

I am trying to write an if statement for a range of cells, so that if any one
of the 6 cells has a certain word in them, my destination cell (where my
formula is written), will give my staff members a certain command. Is there
a way to do this with an 'if' statement, or does anyone have other
suggestions?

Any help you can give me would be much appreciated. Thank you in advance.
Shelli - Senior Accountant

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Or's with If's Statements

If the certain word exist in the cell, will it be the only word in the
cell...or might there be other words along with it? If the text string you
are searching for will not contain any other text along with it, then:

=IF(COUNTIF(A1:A6,"CertainWord")0,"Word exists.","Word does NOT exist.")

HTH,
Paul

"Sr Accountant" wrote in message
...
I am trying to write an if statement for a range of cells, so that if any
one
of the 6 cells has a certain word in them, my destination cell (where my
formula is written), will give my staff members a certain command. Is
there
a way to do this with an 'if' statement, or does anyone have other
suggestions?

Any help you can give me would be much appreciated. Thank you in advance.
Shelli - Senior Accountant



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default Or's with If's Statements

=IF(COUNTIF(A1:A6,"CertainWord")0,"Word exists.","Word does NOT exist.")

You can leave the 0 out and it will still work, right?

Rick
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Or's with If's Statements

This is true. It's jkind of a habit of mine to include the operator in
there, even when it's only necessary to check true or false. Thanks for
pointing that out.


"Rick Rothstein (MVP - VB)" wrote in
message ...
=IF(COUNTIF(A1:A6,"CertainWord")0,"Word exists.","Word does NOT exist.")


You can leave the 0 out and it will still work, right?

Rick





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Or's with If's Statements

There will be three options, "Cash Post", "Do Not Cash Post" or Blank.
Nothing else should appear in the cells. I will give your ideas a try.

Thank you,
Shelli

"PCLIVE" wrote:

If the certain word exist in the cell, will it be the only word in the
cell...or might there be other words along with it? If the text string you
are searching for will not contain any other text along with it, then:

=IF(COUNTIF(A1:A6,"CertainWord")0,"Word exists.","Word does NOT exist.")

HTH,
Paul

"Sr Accountant" wrote in message
...
I am trying to write an if statement for a range of cells, so that if any
one
of the 6 cells has a certain word in them, my destination cell (where my
formula is written), will give my staff members a certain command. Is
there
a way to do this with an 'if' statement, or does anyone have other
suggestions?

Any help you can give me would be much appreciated. Thank you in advance.
Shelli - Senior Accountant




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Or's with If's Statements

This works beautifully. Thank you for all the help. Have a great day!
Shelli

"PCLIVE" wrote:

This is true. It's jkind of a habit of mine to include the operator in
there, even when it's only necessary to check true or false. Thanks for
pointing that out.


"Rick Rothstein (MVP - VB)" wrote in
message ...
=IF(COUNTIF(A1:A6,"CertainWord")0,"Word exists.","Word does NOT exist.")


You can leave the 0 out and it will still work, right?

Rick




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
Multiple If's and OR's Shelly Excel Worksheet Functions 16 February 19th 07 11:44 PM
SUMPRODUCT with AND's and OR's? Ronny Hamida Excel Worksheet Functions 3 July 10th 06 10:57 PM
How many 'if's'? Lynneth Excel Discussion (Misc queries) 1 May 4th 06 03:59 PM
to many 'IF's'?? boufant Excel Worksheet Functions 4 July 2nd 05 10:58 AM
How many if's? Christopher Anderson Excel Discussion (Misc queries) 4 January 5th 05 03:16 PM


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

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

About Us

"It's about Microsoft Excel"