Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Returning a value when 2 other values are true

I know how to use an IF statement to return a value from a cell B if cell A
is true (for example =IF(A1=100,B3,"no value found"). However i need to
compare 2 values and return a 3rd if both values are true. For example, If
cell A is 100 and cell B is <200 then return cell c.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default Returning a value when 2 other values are true

=IF(AND(A1100,B1<200),C1,"Two conditions not met")
but more realistically
=IF(AND(A1100,B1<200),C1,"")
which give either C1 or makes the cell appear blank

If you are happy with getting zero when the two conditions are not meet, you
can avoid IF
=(A1100)*(B1<200)*C1

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Lman" wrote in message
...
I know how to use an IF statement to return a value from a cell B if cell
A
is true (for example =IF(A1=100,B3,"no value found"). However i need to
compare 2 values and return a 3rd if both values are true. For example, If
cell A is 100 and cell B is <200 then return cell c.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default Returning a value when 2 other values are true

Hello,

The boring solution:
=If(And(A1100,B1<200),C1)

The funny solution:
[text result] =REPT(C1,(A1100)*(B1<200))
[value result] =--REPT(C1,(A1100)*(B1<200))

Regards,
Bernd
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Returning a value when 2 other values are true

Thanks!! that was exactly what i was looking for, in fact posting a zero when
the conditions are not met is even better.



"Bernard Liengme" wrote:

=IF(AND(A1100,B1<200),C1,"Two conditions not met")
but more realistically
=IF(AND(A1100,B1<200),C1,"")
which give either C1 or makes the cell appear blank

If you are happy with getting zero when the two conditions are not meet, you
can avoid IF
=(A1100)*(B1<200)*C1

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Lman" wrote in message
...
I know how to use an IF statement to return a value from a cell B if cell
A
is true (for example =IF(A1=100,B3,"no value found"). However i need to
compare 2 values and return a 3rd if both values are true. For example, If
cell A is 100 and cell B is <200 then return cell c.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,104
Default Returning a value when 2 other values are true

Glad to have helped!

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Lman" wrote in message
...
Thanks!! that was exactly what i was looking for, in fact posting a zero
when
the conditions are not met is even better.



"Bernard Liengme" wrote:

=IF(AND(A1100,B1<200),C1,"Two conditions not met")
but more realistically
=IF(AND(A1100,B1<200),C1,"")
which give either C1 or makes the cell appear blank

If you are happy with getting zero when the two conditions are not meet,
you
can avoid IF
=(A1100)*(B1<200)*C1

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Lman" wrote in message
...
I know how to use an IF statement to return a value from a cell B if
cell
A
is true (for example =IF(A1=100,B3,"no value found"). However i need to
compare 2 values and return a 3rd if both values are true. For example,
If
cell A is 100 and cell B is <200 then return cell c.





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
Returning a value rather than TRUE or FALSE. Rich D Excel Discussion (Misc queries) 3 July 30th 08 06:53 PM
lookup returning true or false mike_vr Excel Discussion (Misc queries) 3 January 31st 08 05:54 PM
finding cell value in another column and returning a true or fals bajanswing Excel Worksheet Functions 2 November 17th 06 08:33 PM
Returning a Value if 3 Conditions are True brownie224 Excel Worksheet Functions 5 May 11th 06 11:54 PM
Leave cell data (IF(ISNA(VLOOKUP) is TRUE instead of returning blank (" ") or #NA [email protected] Excel Worksheet Functions 6 October 27th 05 04:02 PM


All times are GMT +1. The time now is 09:50 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"