Sum Horizontal and Vertical

ChetanPuri

Board Regular
Joined
Sep 5, 2018
Messages
97
Office Version
  1. 365
Platform
  1. Windows
Hi Excel Expert Group,

I have a question, on a Result worksheet, I am trying to sum based on between 2 dates in Row B1 and C1 and the addresses from A4 to A9. The 2nd Worksheet (Source Data Sheet) has Dates from 01 July 2024 to 23 June 2024 from Row B1 to BA1 and similarly Addresses from A2 to A7. The issue I get is first when I use the sum product formula in B4 on Result Sheet its showing a cumulative result of $ 61 K between 2 dates and completely ignores Values in Reference cell A on Result sheet and A2 on source Data Sheet. Any help would be much appreciated. The First table I shared is Result Sheet and the Second Table I have shared is Source Data Worksheet. Happy to use any other formula instead of Sumproduct
Thank you in advance for all your help

Result Sheet
Book1
ABCD
1Date From1/07/202414/07/2024
2
3Address Revenue
43 Ficticious road61,511.49
58 Caramel Chocloate Road61,511.49
6105 Ice Cream Road61,511.49
7600 Avocado Road61,511.49
899 Hell Road#VALUE!
9102 Heaven Road#VALUE!
Result Sheet
Cell Formulas
RangeFormula
B4:B9B4=SUMPRODUCT(('Source Data Sheet'!$B$1:$BA$1>='Result Sheet'!$B$1)*('Source Data Sheet'!$B$1:$BA$1<='Result Sheet'!$C$1)*('Source Data Sheet'!$B$2:$BA$7))--('Source Data Sheet'!$A$2:$A$7='Result Sheet'!$A4)


Source Data Sheet

Book1
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBA
1Address 1-Jul-248-Jul-2415-Jul-2422-Jul-2429-Jul-245-Aug-2412-Aug-2419-Aug-2426-Aug-242-Sep-249-Sep-2416-Sep-2423-Sep-2430-Sep-247-Oct-2414-Oct-2421-Oct-2428-Oct-244-Nov-2411-Nov-2418-Nov-2425-Nov-242-Dec-249-Dec-2416-Dec-2423-Dec-2430-Dec-246-Jan-2513-Jan-2520-Jan-2527-Jan-253-Feb-2510-Feb-2517-Feb-2524-Feb-253-Mar-2510-Mar-2517-Mar-2524-Mar-2531-Mar-257-Apr-2514-Apr-2521-Apr-2528-Apr-255-May-2512-May-2519-May-2526-May-252-Jun-259-Jun-2516-Jun-2523-Jun-25
23 Ficticious road8,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.888,433.88
38 Caramel Chocloate Road4,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.49000000000000000000000000000000000000000
4105 Ice Cream Road000000000000605.644,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.494,239.49
5600 Avocado Road6,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.984,784.99000000000000000000000000000000
699 Hell Road0000000000000000000002,870.996,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.986,698.98
7102 Heaven Road11,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.3811,383.388,130.99000000000000000000000000000000000000
Source Data Sheet
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:BA1Expression=#REF!>$C$2textNO
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Like this ??

Excel Formula:
=SUMPRODUCT(('Source Data Sheet'!$B$1:$BA$1>$B$1)*('Source Data Sheet'!$B$1:$BA$1<=$C$1)*('Source Data Sheet'!$A$2:$A$7='Result Sheet'!A4)*'Source Data Sheet'!$B$2:$BA$7)

1720064112744.png
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,088
Members
453,021
Latest member
Justyna P

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