how to sumif multiple columns? Array?

excelq

New Member
Joined
Feb 10, 2005
Messages
5
Hi,

I have a data table with list of products going down the row and weekly sales values going across the columns (4W3=Apr week 3).
I'm trying to do a sumif formula (WITHOUT using Pivot Table) that will give me a sum of:
Apple sold in total month of April (columns C+D).

Tricky part is, when we get a new data each week, columns can get split into two (ie, 4W4.1, 4W4.2) so i need to be able to say, if the column names start with 4 (apr) then match up all the rows with "Apple"

A(prod)-----B(4W3)-------C(4W4)--------D(5W1)
Apple-------10------------8--------------11
Apple-------5-------------6--------------4
Grape-------9-------------7--------------9
Grape-------14------------11-------------13
Grape-------6-------------12-------------10
Grape-------3-------------5--------------3
Lime--------4-------------4--------------7

(for reasons i won't get into, i cannot use Pivot Tables)
Any Ideas?
Much appreciated!!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Control+shift+enter, not just enter:
Code:
=SUM(
   IF($A$2:$A$8=X2,
   IF(LEFT($B$1:$L$1,LEN(Y2))+0=Y2,
     $B$2:$L$8)))

where X2 houses a value of interest like Apple and Y2 a month number of interest like 4 (for April) or 10 (for October).
 
Upvote 0
Thank you so much!
It worked like magic. i knew there was a way....i just didn't know how. Looking at your formula made it clear to me how i need to write my own formulas in the future.
Thank you again.
 
Upvote 0

Forum statistics

Threads
1,223,987
Messages
6,175,794
Members
452,670
Latest member
nogarth

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