View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Two Criteria = 1

Is the "10" a number or a text entry?

Since you enclosed it with quotes in your example, I'll assume it's text.
If it *is a number*, just remove the quotes:

=If(And('Sheet1'!K4="10",'Sheet1'!J4="Apples"),1," ")

You might also try using dedicated cells to hold your variable criteria, so
that you could change the criteria without having to change the formula
itself.

Say A1 for the number,
and A2 for the fruit:

=If(And('Sheet1'!K4=A1,'Sheet1'!J4=A2),1,"")
--
HTH,

RD

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


"Jazz" wrote in message
...
I am looking for help with a formula. Write now if Sheet1 has a "10" in
cell
K4, and I put this formula {=IF('Sheet1'!K4="10",1,""} in cell P4 the
number
"1" will be displayed in cell P4. I wanted to modify the formula so that
if
cell J4 displays "Apples" and K4 displays "10" (assuming I put the formula
in
P4 again) a "1" will be displayed in cell P4. Thank you for your ideas.