IF AND array

ellisbobby

New Member
Joined
Aug 11, 2009
Messages
28
Hello all,

I am trying to create an array to where if two rows contain certain text, it will SUM the totals of the corresponding cells. The current array I am using is below ("Data" is the name of the worksheet that it pulls the information off of). So if the information in row 4 equals cell A4, it will SUM the correct cells in row 37.

{=SUM(IF(Data!$4:$4=$A4,Data!$37:$37))}

I'm trying to get the array to only sum if the data in row 4 equals cell A4 and the data in row 3 equals A3 are true. I tried the array below but it doesn't work.

{=SUM(IF(Data!$3:$3=$A3,Data!$4:$4=$A4,Data!$37:$37))}

Does anyone know if this is possible? Thanks in advance.
 
Last edited:

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try the following:

{=SUM(IF(Data!$3:$3=$A3,IF(Data!$4:$4=$A4,Data!$37:$37)))}

Another option is SUMPRODUCT:

=SUMPRODUCT((Data!$3:$3=$a3)*(Data!$4:$4 =$a4)*(Data!$37:$37))
 
Upvote 0
ExcelElliott... Thank you so much! You just saved me a ton of time! I went with the first formula, but I'll give the second a shot as well. I can't thank you enough!
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,611
Members
452,660
Latest member
Zatman

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