Excel formulas to track sales - count and extract functions - excel

This is an example of a sales tracking spreadsheet that I want to create.
I want column L to count the number of sales each person does but do it so that it runs in a fill series order. I have inputted data manually in column L to demonstrate.
there are approximately 11 different types of membership. As I enter the sales information in columns B to G, I want the types of membership in column G to extract to the breakdown box in columns P to T. This is so that I can see which staff member sells what types.
I want to replicate this formula to work out how much each staff member has taken financially. this would extract from H/I to the other box in column P to T.

Answer to the first part of your question:
I want column L to count the number of sales each person does but do it so that it runs in a fill series order.
Formula for cell L1
=COUNTIF($K$1:K1;K1)
For L2 it then becomes
=COUNTIF($K$1:K2;K2)

Related

EXCEL - Find if value exists in column B in the range of a value in column A

I have a list of companies with certain products. Now I want to find out if one company has a certain product or not. Example, I want to find out which company had Product C and return a one on all cells:
Column 1
Company A
Company A
Company A
Company A
Company B
Company B
Column 2
Product A
Product B
Product C
Product A
Product B
Column 3 (Result):
1
1
1
0
0
This solution will require 2 additional columns. I'm assuming your first row is headers, and the range is from A1:B6. Data starts on Row 2. I'll give a few options on how to execute this though. Where I put "Product C" can also reference a cell. Whenever I'm using binary like this it's usually to filter datasets, so there might be a better alternative to what you want vs. what's below.
In Column C, =if(B2="Product C",1,0) or you can use =--(B2="Product C")
Sort by Column C in Descending Order, =vlookup(A2,$A$2:$A$6,1,0) copy and paste as values, but if you keep the formula and resort it will mess up.
If Product C would only appear once for any given company you can us Sumifs too. =Sumifs($C$2:$C$6,$A$2:A$6$,A2)
If you have 365, you can also use Maxifs($C$2:$C$6,$A$2:A$6$,A2), which won't care how you sort the dataset.

Excel: Count Only Once If Another Column Has Duplicates

I am trying to create a formula that will count the number of "Overdue" people instead of "Overdue" cells. Each person has the multiple rows with their name in it. The criteria to determine if it's "overdue" is:
-Column F and G are not within 3 years
-Column G are blank
-Column F = 0 and Column G are not within 3 years
The following code counts the criteria accurately. And doesn't account for duplicate names.
=SUM(COUNTIFS(TT[Fiscal Law 301 CBT],"<"&TODAY()-1065,TT[Fiscal Law 301 CBT],">"&TODAY()-1095,TT[Fiscal Law In-Residence],"<"&TODAY()-1065,TT[Fiscal Law In-Residence],">"&TODAY()-1095),COUNTIFS(TT[Fiscal Law In-Residence],"",TT[Fiscal Law 301 CBT],"<"&TODAY()-1065,TT[Fiscal Law 301 CBT],">"&TODAY()-1095))
The formula I want should count based on the criteria above and check column Z TT[Name] for duplicates and count them only once. And also count unique values once.
I just thought of another approach to this problem. What if I use the formula I have to create an Array, have another formula count the number of duplicates in Column Z from that Array, and subtract the two numbers.
This way should get me the correct number, i will still need assistance creating the second formula.
What you are after is a distinct count. Excel has a function for that in the new Dynamic Array function set, which is in Office 365 Insider builds but not available to everyone. Right now, a distinct count requires a few tricks.
For example, you can create a pivot table with the names in the rows, filter the table to include only values where column X = Overdue and use a CountA() on the result rows.
You are close, but not quite there.
Use a countifs formula like above. Then, create a column next to it with the logic if(countcell>0, 1, 0). This will return 1 if the person has at least 1 book overdue, and 0 otherwise. Then, take the sum of that column.
Formulas
I have provided a screenshots of the code that we would use (the E and F columns are dates). As you can see, the G column counts how many books are overdue. The H column provides a 1 if at least 1 book is overdue for each user. Then, we can simply sum the H column to find the total number of users with overdue books.
If this helps you, please consider choosing this as the answer.

count unique values by category using excel formula

I have a database table with a set of category names in column A. think of it as category A, B, C, D, etc. then in column b I have numbers for each category. for a specific category, say category A, the related numbers are not unique and may occur in different frequencies.
now I have another table, a summary one and I want a formula to count unique numbers for each category from the database table and return it in front of the category name.
I use excel 2010
for some reasons I do not want to use pivot table or macros
data is as below
A 10
A 10
A 20
A 15
B 25
B 25
B 25
B 30
B empty(blank)
the desired results should be as this
A 3
B 2
thanks for help
So an example of sumif() and countif().
But I am not sure what you really want as there are 4 categories of A, and 4 of B - unless some numbers must be ignored.
However, see:
Note, if the columns A & B only have the relevant information you can define the range as A:A, but if the range has to be limited then you need to use A1:A17.
Edit try:
The best way of doing these is to use Frequency:
=SUM(--(FREQUENCY(IF(A$2:A$20=D2,B$2:B$20),B$2:B$20)>0))
entered as an array formula using CtrlShiftEnter
Plz search on 'Count unique with a condition' for more information.

Excel counting pairs

I have 5000 rows. In column A I have the salesperson , in column B the buyer. I am trying to find out how many times each combination appear together. e.g. Did salesman Abe sell to Buyer Bob 33 times, to buyer Carl 19?
ok takes a few extra columns to accomplish this but here goes...screenshot attached first.
First you need to concatenate the two columns (A and B)you want to enumerate in column C (the formula will accommodate a string in case names column is first last with spaces etc.)
=$A2&" "&$B2
Then in column D use the following formula to determine whether or not the name combination is duplicated but only true for one instance. I'll explain why in a second.
=$C1<>$C2
Then in column E count the matches.
=COUNTIF($C:$C,$C2)
After doing all that, filter results by "True" tally for all the True columns is the number of matching rep/customer relationships.

Creating a Top Ten list in Excel

I have been searching for a way to make a "Top Ten" list for my uncles hockey league in Excel.
There are 5 different teams with their own worksheets and I made a separate worksheet called "data" referencing all of the players and their individual stats so that I could pull my "Top Ten" from one worksheet instead of five.
The worksheet is setup as follows:
Player1 Player2 Player3 etc...
Name
Team
Goals
Assists
Points
I would like to search for the player with the highest number of "Points" and return the name, team, goals, assists, and points on a single row, and then move down for the next player, i.e.:
Name 1 Team Goals Assists Points
Name 2 Team Goals Assists Points
I have tried using multiple ways including index and hlookup with the large and match commands, but could not get anything to work.
I feel like I am missing something simple here.
If it would be easier to have the players in rows, I could do that.
I was just having a problem with my references filling in the way I wanted them to.
Initial table:
B1: =COUNTA(B6:O6)(the number of players)
B6:O6 Name
B7:O7 Team
B8:O8 Goals
B9:O9 Assists
B10:O10 Points
Formulae below determine the rank for the player. If the score of points are equal, the player having a greater number of goals ranks higher.
B4: =$B$1-RANK(B$10;$B$10:$O$10)+B8/1000, the formula is copied to the right. The result will be fractional numbers with equal integer parts for the equal amount of points.
B3: =RANK(B4;$B$4:$O$4), the formula is copied to the right
B2: =IF(COUNTIF(C$3:$O$3;B3)>0;B3+COUNTIF(C$3:$O$3;B3);B$3)
Ranked table:
A15 and down : Rank (1,2...n)
B15 and down : =HLOOKUP(A15;$A$2:$O$3;2;FALSE)
In the next columns: Name (col C), Goals (col D), Assists (col E), Points (col F)
C15: =HLOOKUP($A15;$A$2:$O$10;5;FALSE)
D15: =HLOOKUP($A15;$A$2:$O$10;7;FALSE)
E15: =HLOOKUP($A15;$A$2:$O$10;8;FALSE)
F15: =HLOOKUP($A15;$A$2:$O$10;9;FALSE)
Formulae in B11:E11 will be copied down.
Example spreadsheet: http://www.bumpclub.ee/~jyri_r/Excel/Top_players_matrix_transposed.xls
you have to transpose the table first..
select all the rows and columns of your table.
right click the first cell where you want to paste the table
click paste special option
check the transpose check-box in the dialog-box opened.
your table is now transposed. now simple sorting can give u answer
for sorting columns :
select the whole table and click on the sort option on menu bar,
now you can retrieve all 10 top teams from this sorted list.

Resources