Compare two columns with another two columns and return

Closed
Ree1931 - Oct 30, 2015 at 12:41 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 2, 2015 at 11:02 AM
Hello,

I need to compare two columns with another two columns and return date from a third colum.
Example I have a zip code with 90004 with 3 different cities and a tax rate of 8.25, for city Los Angeles Hollywood 7.25 and East La 8.45 . In the columns that I need to compare I have Zip code 90004 with the city of Hollywood but I need to compare the zip code and the city and pull out the tax rate how can I get that information in to the third column?
Thanks for your help.

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Nov 2, 2015 at 11:02 AM
Hi Ree1931,

I put you sample data in the range A1:C4.
Then I used range F2:H2 for Zip code, City and formula:
=SUM((A2:A4=F2)*(B2:B4=G2)*(C2:C4))

This is an array formula and needs to be confirmed by hitting Ctrl+Shift+Enter instead of just Enter.

Best regards,
Trowa
Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.
0