New Excel User - Conditional Formula help

1stGenHeel

New Member
Joined
Jun 28, 2011
Messages
8
I need assistance with a conditional formula that will filter on two fields, and then add two values that are on the same line if the two conditions are met.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
Ex.
Cell A1 = 06/25/2011
Cell B1 = John Smith
Cell C1 = Value1
Cell D1 = Value2
<o:p> </o:p>
Desired result = If A1 = 06/25/2011 and B1 = John Smith, add C1 and D1
<o:p> </o:p>
The formula (and results) will be on a different worksheet from the actual data.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I need assistance with a conditional formula that will filter on two fields, and then add two values that are on the same line if the two conditions are met.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Ex.
Cell A1 = 06/25/2011
Cell B1 = John Smith
Cell C1 = Value1
Cell D1 = Value2
<o:p></o:p>
Desired result = If A1 = 06/25/2011 and B1 = John Smith, add C1 and D1
<o:p></o:p>
The formula (and results) will be on a different worksheet from the actual data.
Try this...

=IF(AND(A1=DATE(2011,6,25),B1="John Smith"),C1+D1,"")
 
Upvote 0
Thanks that works, except I may have left some information out.

When I am looking for the date and name I will be looking through a range of cells, instead of just a single cell.

When I try that same formula using a range for A and B it returns an error.

Any ideas?
 
Upvote 0
Jonmo1 thanks for the reply. That solved the array for date and name, but I get N/A if I try to add an array for the final portion of that formula.

=SUMPRODUCT((A1:A100="6/25/2011"+0)*(B1:B100="John Smith")*(C1:D100))

I apologize for asking so many questions, but what I was hoping to do is this:

If A3 = 06/25/2011, and B3 = John Smith, return the value that is in C3
or
If A3 = 06/25/2011, and B3 = John Smith, return the value C3+D3

So in example 1, without having to specify E3, I was hoping that by using C1:D100 if the other two criteria were met on A3 and B3, the formula would return C3.
 
Upvote 0
Sorry, I don't see the difference between the criteria in the 2 lines

If A3 = 06/25/2011, and B3 = John Smith, return the value that is in C3
or
If A3 = 06/25/2011, and B3 = John Smith, return the value C3+D3

Those 2 look exactly the same to me...
 
Upvote 0
Sorry, I should have just used one example. The second example was just to indicate I may do simple adding/subtracting of two different cells.

Just looking at example 1, if I try to put a range for the C3 values it returns an N/A.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,752
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top