count sales per Salesman

deletedalien

Well-known Member
Joined
Dec 8, 2008
Messages
505
Office Version
  1. 2013
Platform
  1. Windows
so.....

this seems to be pretty straightforward but for the life of me i can't seem to think of a formula that could work with this....


i have a list of salesmen who well.... made sales...

and i need to count the amount of sales per salesman, however, the salesman nema only shows up once per sales report...

See file here:
https://1drv.ms/x/s!Agyr_mEIeS75gaZsHzHC_kd_G-5sGg?e=dEze1a

how can i count the total lines per salesman,

say

salesman 12355, who sold 115,464.78, he has a total of 5 sales (5 lines under him...)

Salesman 12587 who sold 197,053.27 He has a total of 7 sales (has 7 lines under him...)


this is a short report but some of these include up to 30 salesmen.

is this even possible?

Thanx in advance
 
Because the formulas are looking in G and E, etc. -- I would move the RESULTS to the left (e.g., starting in the D column) such as:


Excel 2010
DEF
534250004115,464.785
544250017197,053.277
SalesPeople
Cell Formulas
RangeFormula
E53=SUMIF($G$1:$G$1000,D53,$I$1:$I$1000)
F53=COUNTIF($G$1:$G$1000,D53)
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
If you have the sales people listed in, say, E53 and E54, etc., etc., then the total amount for them would be using Logit's formula:

Rich (BB code):
=SUMIF($G$1:$G$1000,E53,$I$1:$I$1000)

Excel 2010
EF
534250004 115,464.78
544250017 197,053.27

<tbody>
</tbody>
SalesPeople

Worksheet Formulas
CellFormula
F53=SUMIF($G$1:$G$1000,E53,$I$1:$I$1000)

<tbody>
</tbody>

<tbody>
</tbody>

yup, you are absolutely correct,

except in order to do that...
i would need to bring in a vlookup to obtain the salesman # and then do a sumif....
and yes that would tottaly work...

Except since i can't keep a "database" of all salesmen in the same workbook (legal stuff) i would need to reference an external workbook and such...

its a great suggestion...
but it won't work for my particular case...
 
Last edited:
Upvote 0
If you don't want to type in the salesman numbers, you could go back to my previous example and use:


Excel 2010
DEF
534250004115,464.785
544250017197,053.277
SalesPeople
Cell Formulas
RangeFormula
E53=SUMIF($G$1:$G$1000,D53,$I$1:$I$1000)
F53=COUNTIF($G$1:$G$1000,D53)
D53{=INDIRECT("G"&SMALL(IF(ISNUMBER(SEARCH("Salesman",$G$1:$G$1000)),ROW($G$1:$G$1000),""),(ROW()-52))+1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
.
You should follow kweaver 's example. It will require a change in your layout but some times that is required to obtain the desired results.
 
Upvote 0
i want to....
its the easiest way....
but i cant... :(
 
Last edited:
Upvote 0
i think what i might HAVE to do is.....

get unique values....


Array
{=IFERROR(INDEX($G$10:$G$47, MATCH(0,COUNTIF($F$40:F43, $G$10:$G$47), 0)),"")}

Then....
countif... the result of those unique values...
 
Upvote 0
If you don't want to type in the salesman numbers, you could go back to my previous example and use:

Excel 2010
DEF
534250004 115,464.78 5
544250017 197,053.27 7

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
SalesPeople

Worksheet Formulas
CellFormula
E53=SUMIF($G$1:$G$1000,D53,$I$1:$I$1000)
F53=COUNTIF($G$1:$G$1000,D53)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
D53{=INDIRECT("G"&SMALL(IF(ISNUMBER(SEARCH("Salesman",$G$1:$G$1000)),ROW($G$1:$G$1000),""),(ROW()-52))+1)}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

i KNOW i have to be doing something wrong.....

your array formula gives me an #num !...... error...
(i did use ctrl+shift+enter)
 
Upvote 0
You'll have to clarify why you can't use the suggested approach. If you are showing the salesman numbers in the G column, why can't you have them inserted by formula or typing them in the results section?
It's not like you're hiding them in G ????
 
Upvote 0
You will get a #num error if you placed the results block w/this array formula in another section of the worksheet.

If the results section BEGINS in D53, it will work. If you've placed it starting in, say, D100, it will NOT work without changing the 52 to 99 in this case.

I said as much in an earlier post when I used this technique.
 
Last edited:
Upvote 0
Because i can't use the salesman ID.

i would preffer to use the salesman name.

Salesman Total $ Total sales
Person1 $115,464.78 5
Person2 $197,053.27 7

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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