Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default matching cells

I am looking for a formula that if the cell A1 and A2 match then cell A3 will
be 4
if they do not match then 0

example: A1 has YES and A2 has YES then cell A3 will be 4
IF both cells are blank the A3 would say 4
A1 has YES and A2 has NO then cell A3 will be 0
A1 has NO and A2 has YES then cell A3 will be 0

Is this possible?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default matching cells

=IF(A1=A2,4,0)

"deepokerman" wrote:

I am looking for a formula that if the cell A1 and A2 match then cell A3 will
be 4
if they do not match then 0

example: A1 has YES and A2 has YES then cell A3 will be 4
IF both cells are blank the A3 would say 4
A1 has YES and A2 has NO then cell A3 will be 0
A1 has NO and A2 has YES then cell A3 will be 0

Is this possible?
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default matching cells

Here is another formula to do what you want (put it in A3)...

=4*(A1=A2)

--
Rick (MVP - Excel)


"deepokerman" wrote in message
...
I am looking for a formula that if the cell A1 and A2 match then cell A3
will
be 4
if they do not match then 0

example: A1 has YES and A2 has YES then cell A3 will be 4
IF both cells are blank the A3 would say 4
A1 has YES and A2 has NO then cell A3 will be 0
A1 has NO and A2 has YES then cell A3 will be 0

Is this possible?
Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default matching cells

Yes, that worked. But what would i have to do to make cell A4 be 4 if cellS
A1, A2 A3 are the same and have cell A4 be 0 if A1 A2 A3 do not match in any
order?

"Patrick Molloy" wrote:

=IF(A1=A2,4,0)

"deepokerman" wrote:

I am looking for a formula that if the cell A1 and A2 match then cell A3 will
be 4
if they do not match then 0

example: A1 has YES and A2 has YES then cell A3 will be 4
IF both cells are blank the A3 would say 4
A1 has YES and A2 has NO then cell A3 will be 0
A1 has NO and A2 has YES then cell A3 will be 0

Is this possible?
Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default matching cells


=if(and(a1=a2,a2=a3),4,0)

or a la Rick:
=4*(AND(A1=A2,A2=A3))

no, I got that wrong:
=4*(A1=A2)*(A3=A3)


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=146902

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
Matching cells saman110 via OfficeKB.com Excel Discussion (Misc queries) 0 March 12th 08 09:06 PM
display a range of cells editible cells based on matching date Miki Excel Worksheet Functions 0 October 10th 07 03:27 PM
Matching cells gary Excel Programming 4 October 8th 07 10:47 PM
Help with Matching Text Fields - Then Moving the Matching Cells Side by Side [email protected] Excel Discussion (Misc queries) 2 June 11th 07 02:38 PM
Matching cells [email protected] Excel Discussion (Misc queries) 0 July 1st 05 02:43 PM


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