formula to add sales

leott

New Member
Joined
Dec 23, 2013
Messages
5
I have a table rows: salesman sales date (mm/dd/yyyy) for many years of sales

I am trying to isolate total number of sales of each salesman by month and day (excluding year)

excel dates are giving me fits

example:
salesman sales date
man1 2 5/1/2018
man 2 3 5/2/2018
man 1 4 4/1/2011
man 3 2 3/1/2017
man 1 4 5/2/2009
man 1 4 5/1/2017

results:
man 3 2 3/1
man 1 4 4/1
man 1 6 5/1
man 1 7 5/2
man 2 3 5/2

Thanks for any suggestions
 

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
Use a Pivot table to get the desired results. Dates in rows, Salesman in rows, Sales in Values. Ungroup the dates to show Months and years.
 
Upvote 0
DATA
ROW B C date E
salesman sales date HELPER
3 man1 2 01-05-2018 1
4 man2 3 02-05-2018 1
5 man1 4 01-04-2011 1
6 man3 2 01-03-2017 1
7 man1 4 02-05-2009 1
8 man1 4 01-05-2017 0

Result table

ROW H I J
3 man3 2 3/1
4 man1 4 4/1
5 man1 6 5/1
6 man2 3 5/2
7 man1 4 5/2
8
9

Formulas
Helper Column E. In E3
=1*(SUMPRODUCT(($B$3:$B3=B3)*(MONTH($D$3:$D3)=MONTH(D3))*(DAY($D$3:$D3)=DAY(D3)))=1)
ARRAY formulas below
In H3
Code:
=IFERROR(INDEX($B$3:$B$8,SMALL(IF(SMALL(IF($E$3:$E$8=1,100*MONTH($D$3:$D$8)+DAY($D$3:$D$8),""),ROWS($J$3:$J3))=100*MONTH($D$3:$D$8)+DAY($D$3:$D$8),ROW($D$3:$D$8),""),COUNTIF($J$3:J3,J3))-ROW($B$3)+1),"")
In I3
Code:
=IFERROR(SUMPRODUCT(($C$3:$C$8)*($B$3:$B$8=H3)*(MONTH($D$3:$D$8)=--(LEFT(J3,FIND("/",J3)-1)))*(DAY($D$3:$D$8)=--MID(J3,FIND("/",J3)+1,2))),"")
In J3
Code:
=IFERROR(INDEX(MONTH($D$3:$D$8)&"/"&DAY($D$3:$D$8),MATCH(SMALL(IF($E$3:$E$8=1,100*MONTH($D$3:$D$8)+DAY($D$3:$D$8),""),ROWS($J$3:$J3)),100*MONTH($D$3:$D$8)+DAY($D$3:$D$8),0)),"")

How ARRAY formula is entered


Paste Formula in the cell.
Press F2
Hold Shift+ Ctrl Keys and hit Enter key.
Now the formula is surrounded by {} by excel.
 
Upvote 0

Forum statistics

Threads
1,215,048
Messages
6,122,862
Members
449,097
Latest member
dbomb1414

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