ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Checking cells are = and return a value (https://www.excelbanter.com/excel-discussion-misc-queries/160031-checking-cells-%3D-return-value.html)

nev1956

Checking cells are = and return a value
 
Hi dose any one know how to ckeck if two or more cells are true and then
return a value e.g if one cell = 10 and another cell =20 then return a value
of another cell or what ever it needs to be

Dave Peterson

Checking cells are = and return a value
 
Say your two cells are A1 and A2. And you want to bring back the value of A3 if
A1=10 and A2=20. But you want to bring back a value from A4 if at least one of
them is different (a1 different from 10 or a2 different from 20):

=if(and(a1=10,a2=20),a3,a4)

You could even show text:
=if(and(a1=10,a2=20),a3,"A1 and A2 are not what they should be!")

You may want to provide more details if this doesn't help.

nev1956 wrote:

Hi dose any one know how to ckeck if two or more cells are true and then
return a value e.g if one cell = 10 and another cell =20 then return a value
of another cell or what ever it needs to be


--

Dave Peterson


All times are GMT +1. The time now is 12:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com