Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default set logical test to see if 4 cells have same value

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default set logical test to see if 4 cells have same value

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

"ChrisMohler" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,081
Default set logical test to see if 4 cells have same value

=IF(AND(A1=B1,A1=C1,A1=D1),"YUP","NOPE")


"ChrisMohler" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default set logical test to see if 4 cells have same value

=countif(A1:B2,A1)=4

--
Regards,
Tom Ogilvy


"ChrisMohler" wrote:

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.

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
Logical test Sherees Excel Discussion (Misc queries) 3 December 12th 09 09:27 AM
Logical Test with multiple cells Deanna Excel Worksheet Functions 2 October 20th 08 03:34 AM
Logical Test Melody Excel Worksheet Functions 5 February 20th 08 03:26 AM
logical test Ron Coderre Excel Worksheet Functions 0 August 7th 06 08:02 PM
Logical test Chip Pearson Excel Programming 1 July 2nd 04 05:53 PM


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