Thank you in advance for any assistance you can provide:
Excel example.JPG
I am trying to count the number of clients (Row 22) accrued each month. I have tried various Count, Sum, Offset and Logic rules but cannot get this to work.
Thank you in advance for any assistance you can provide:
Excel example.JPG
I am trying to count the number of clients (Row 22) accrued each month. I have tried various Count, Sum, Offset and Logic rules but cannot get this to work.
you don't say what you've tried so far.
how about =COUNTIF(C2:C19,"<>") dragged right.
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
Thanks Sambo Kid.
Problem with that formula is it only counts the active clients in that month. If we assume a client becomes live the first month they sell units, any units they sell in a later month shouldn't be counted.
Sorry if I'm not explaining as well as poss!
Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
FYI I have hard entered the count value that the formula needs to generate in Row 22
Did I understand correctly? Ex. Client10 (in row 11) have to be counted only in D22 as 'his' debut and should not be taken into account on Apr and May, right?
So attached file is wrong imho, should be
Capture.JPG
3 7(4 new) 7(0)new 8(1 new) etc.
Last edited by KOKOSEK; 02-09-2019 at 09:19 AM.
Try this in B22:
=SUMPRODUCT(--(SUMIF(OFFSET($B$2:B$2,ROW($B$2:$B$20)-ROWS($B$1:$B$2),),">0")>0))
IMHO works perfect.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
Please make your thread titles more descriptive in future. Thanks.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Please try at J119
=SUMPRODUCT(N(MMULT(N($J31:J117>0),ROW(INDIRECT("1:"&COLUMNS($J31:J117)))^0)>0))
First, you need to understand MMULT, which quite hard to explain.
Please read this
https://www.engineerexcel.com/matrix...tion-in-excel/
Small change
J119
=SUMPRODUCT(N(MMULT($J31:J117,ROW(INDIRECT("1:"&COLUMNS($J31:J117)))^0)>0))
J119
$J31:J117 return matrix of 87 Rows and 1 Column
ROW(INDIRECT("1:"&COLUMNS($J31:J117)))^0 give {1} 1 row 1 column
MMULT(N($J31:J117>0),ROW(INDIRECT("1:"&COLUMNS($J31:J117)))^0) give result of sum of each 87 rows
For MMULT Column# of the 1st array need to match row# of 2nd Array as in blue
K119
$J31:K117 return matrix of 87 Rows and 2 Columns
ROW(INDIRECT("1:"&COLUMNS($J31:K117)))^0 give {1;1} 2 rows 1 column
MMULT(N($J31:J117>0),ROW(INDIRECT("1:"&COLUMNS($J31:J117)))^0) give result of sum of each 87 rows and 2 columns, and so on for the next column.
=SUMPRODUCT(N(MMULT($J31:J117,ROW(INDIRECT("1:"&COLUMNS($J31:J117)))^0)>0))
Green part for chech each row if sum are more than 1 and Sumproduct to count that.
You may change Phuocam's formula to below.
Sumif(offset()) result is similar to MMULT()
=SUMPRODUCT(N(SUMIF(OFFSET($J31:J31,ROW(J31:J117)-ROW(J31),),">0")>0))
or
=SUMPRODUCT(N(SUBTOTAL(9,OFFSET($J31:J31,ROW(J31:J117)-ROW(J31),))>0))
Last edited by Bo_Ry; 02-09-2019 at 12:46 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks