Count how many months sales were made

Godders199

Active Member
Joined
Mar 2, 2017
Messages
302
Office Version
  1. 2013
Hello, struggling to find where to start on this one... I have a spreadsheet column a is sales persons name, column b is sales date. On sheet 2 is a list of the active sales people.
I need to find for each sales person on sheet2 how many months of the year they made a sale. For example life salesperson A , made 10 sales in January and 2 in March and 1 in May. I need to return the answer 3 in column b on sheet 2

i found code that removes all but the first entry each month for each sales person, but I need to keep all the data.

any help,or links to examples would be appreciated.
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

ER_Neha

Board Regular
Joined
Jul 25, 2020
Messages
130
Office Version
  1. 365
Platform
  1. Windows
Hello I hope I understood your question. Kindly provide your feedback
Book2
ABC
1Sales Person Namesales dateSales
2Anna01-01-202010
3James01-02-20205
4John01-04-202010
5Anna01-02-20205
6James01-03-202010
7John15-04-202010
8Anna01-02-20205
Sheet1

This is the formula as in sheet 2
Book2
AB
1Sales Person NameTotal months of sale
2Anna2
3John1
4James2
5
Sheet2
Cell Formulas
RangeFormula
B2:B4B2=COUNT(UNIQUE(IF(Sheet1!$A$2:$A$8=Sheet2!A2,MONTH(Sheet1!$B$2:$B$8))))
 

Watch MrExcel Video

Forum statistics

Threads
1,127,328
Messages
5,624,034
Members
416,007
Latest member
csf

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
Top