Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default are these 2 statements equivalent?

=AND(H2=T2,T2=T4,T4=T6,T6=W8,H21=H2)
=AND(H2,T2,T4,T6,W8 =H21)


--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default are these 2 statements equivalent?

Nope.

Put False in all those cells and look how each formula evaluates.

Gary Keramidas wrote:

=AND(H2=T2,T2=T4,T4=T6,T6=W8,H21=H2)
=AND(H2,T2,T4,T6,W8 =H21)

--

Gary


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default are these 2 statements equivalent?

ok, is there a shorter way to write the first one?

--


Gary


"Dave Peterson" wrote in message
...
Nope.

Put False in all those cells and look how each formula evaluates.

Gary Keramidas wrote:

=AND(H2=T2,T2=T4,T4=T6,T6=W8,H21=H2)
=AND(H2,T2,T4,T6,W8 =H21)

--

Gary


--

Dave Peterson



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default are these 2 statements equivalent?

Gary Keramidas wrote:
ok, is there a shorter way to write the first one?


this is no shorter, but IMO the intent is much more clear:

=AND(H2=T2,H2=T4,H2=T6,H2=W8,H2=H21)



Bob
--
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default are these 2 statements equivalent?

Gary

It is a little shorter, and I think a lttle clearer to just go with

=h2=t2=t4=t6=w8=h21

since it looks to me like you want TRUE if those cells are all the same
and FALSE otherwise.

Ken


Gary Keramidas wrote:
=AND(H2=T2,T2=T4,T4=T6,T6=W8,H21=H2)
=AND(H2,T2,T4,T6,W8 =H21)


--


Gary


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
How do you use the equivalent of NOT in text? Matt Excel Worksheet Functions 2 January 25th 10 05:29 PM
Function Equivalent need ytayta555 Excel Worksheet Functions 6 May 7th 08 02:53 PM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM
Equivalent Of VAL davidm Excel Programming 4 July 27th 05 06:22 PM
VBA equivalent of MATCH() Mike Echo Excel Programming 1 May 10th 05 10:54 AM


All times are GMT +1. The time now is 03:24 AM.

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"