I am creating a report that uses data imported from a SQL Database. Sheet 1 (Data) contains the imported Data:
ColA- SalesID
ColB- CustAccount
ColC-SalesName
ColD-OrderReceivedMonth
ColE-OrderReceievedYear
ColJ-LineAmount
I then have another sheet (BookingsReport) that contains:
A5-SalesName
B5-CustAccount B2=(Manually entered year) [2011 for instance]
D5-CustGroup
E5-April E4=B2
F5-May E4=B2
G5-June E4=B2
H5-July E4=B2
I5-Aug E4=B2
J5-Sept E4=B2
K5-Oct E4=B2
L5-Nov E4=B2
M5-Dec E4=B2
N5-Jan E4=B2+1
O5-Feb E4=B2+1
P5-March E4=B2+1
For each month, I need to formulate the sum of all orderes (LineAmount) by the CustAccount. I have the formula in E6 to E2000
=SUMIFS(Data!$J$5:$J$200000,Data!$B$5:$B$200000,BookingsReport!$B6,Data!$D5:$D200000,MONTH(E$5))
This formula successfully sums the numbers for each CustAccount for each month. The problem I'm having is getting it to sort our by year as well. I've tried the formula:
=SUMIFS(Data!$J$5:$J$200000,Data!$B$5:$B$200000,BookingsReport!$B6,Data!$D5:$D200000,MONTH(E$5), Data!$E$5:$E$200000, YEAR(E$4))
But all that I get back is "0" for everything. What am I doing wrong? Any help would be greatly appreciated!
Welcome to the Forum, unfortunately:
This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.
Thread Closed.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks