I am trying to write a formula in Excel that tells whether 4 cells in the
same row have the same value. The IF function is limited to 2 cells.
Tom Hutchins - 22 Mar 2006 19:41 GMT
The IF function is limited to 2 cells, but you can nest up to 7 IF functions
within one statement. You can also combine IF with the AND or OR functions.
Try something like this:
=IF(AND(A9=B9,A9=C9,A9=D9),TRUE,FALSE)
Hope this is helpful.
Hutch
> I am trying to write a formula in Excel that tells whether 4 cells in the
> same row have the same value. The IF function is limited to 2 cells.
Duke Carey - 22 Mar 2006 19:41 GMT
=IF(AND(A1=B1,A1=C1,A1=D1),"YUP","NOPE")
> I am trying to write a formula in Excel that tells whether 4 cells in the
> same row have the same value. The IF function is limited to 2 cells.
Tom Ogilvy - 22 Mar 2006 20:00 GMT
=countif(A1:B2,A1)=4

Signature
Regards,
Tom Ogilvy
> I am trying to write a formula in Excel that tells whether 4 cells in the
> same row have the same value. The IF function is limited to 2 cells.