Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default How do I combine If and AND Formula

I want to use a IF Formula but need to combine it with an AND Formula as I am
trying to check if the value of a cell is between two values...in my case If
cell is between 12 and 24 show "X".

I came so far as =If(A1=12;"X";"") so now I need to get it also to check if
A1 is smaller than 24. How can I do that?

Regards

Nicole
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default How do I combine If and AND Formula

Fixed it...thanks.

"Nicole" wrote:

I want to use a IF Formula but need to combine it with an AND Formula as I am
trying to check if the value of a cell is between two values...in my case If
cell is between 12 and 24 show "X".

I came so far as =If(A1=12;"X";"") so now I need to get it also to check if
A1 is smaller than 24. How can I do that?

Regards

Nicole

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default How do I combine If and AND Formula

Use the AND function

=IF(AND(A1=12,A1<24),"X","") or perhaps you meant
=IF(AND(A1=12,A1<=24),"X","")
Tyro


"Nicole" wrote in message
...
I want to use a IF Formula but need to combine it with an AND Formula as I
am
trying to check if the value of a cell is between two values...in my case
If
cell is between 12 and 24 show "X".

I came so far as =If(A1=12;"X";"") so now I need to get it also to check
if
A1 is smaller than 24. How can I do that?

Regards

Nicole



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I combine If and AND Formula

Use the AND function

=IF(AND(A1=12,A1<24),"X","") or perhaps you meant
=IF(AND(A1=12,A1<=24),"X","")


If she meant the latter one, it's possible to have a formula without even
using the AND function...

=IF(ABS(A1-18)<=6,"X","")

Rick

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default How do I combine If and AND Formula

Obfuscation is a grand thing. I remember when we wrote entire C programs on
one line. Let's keep it simple
Tyro

"Rick Rothstein (MVP - VB)" wrote in
message ...
Use the AND function

=IF(AND(A1=12,A1<24),"X","") or perhaps you meant
=IF(AND(A1=12,A1<=24),"X","")


If she meant the latter one, it's possible to have a formula without even
using the AND function...

=IF(ABS(A1-18)<=6,"X","")

Rick





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default How do I combine If and AND Formula

<<<"Let's keep it simple"

Why?

Don't forget ... these groups are not just for the OPs.
They're part of an educational process for anyone interested in XL,
plus they add to the archives.

Once the OPs have their uncomplicated, lucid suggestions, what comes beyond
that can be enjoyable and entertaining, not to mention didactic, and
pedagogical to the "more informed".

--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------


"Tyro" wrote in message
...
Obfuscation is a grand thing. I remember when we wrote entire C programs on
one line. Let's keep it simple
Tyro

"Rick Rothstein (MVP - VB)" wrote in
message ...
Use the AND function

=IF(AND(A1=12,A1<24),"X","") or perhaps you meant
=IF(AND(A1=12,A1<=24),"X","")


If she meant the latter one, it's possible to have a formula without even
using the AND function...

=IF(ABS(A1-18)<=6,"X","")

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
How to combine a symbol and a formula Heine Excel Worksheet Functions 2 June 26th 07 01:06 PM
How do I combine an if and min formula? Chris Snellen Excel Worksheet Functions 2 September 3rd 06 09:37 AM
Formula to combine text? coal_miner Excel Worksheet Functions 5 August 18th 05 04:29 PM
Combine VLOOKUP, IF, AND in one formula Natalie Excel Worksheet Functions 5 April 5th 05 02:32 PM
formula to combine cells using if/then Roland Excel Worksheet Functions 1 January 25th 05 02:51 PM


All times are GMT +1. The time now is 10:57 AM.

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"