Counting between status based on unique ID

creative999

Board Regular
Joined
Jul 7, 2021
Messages
97
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
I want to know how many opportunities were:

Created, ‘OPP CREATED’ through to a quote being sent, ‘QUOTE SENT’ (Col B)

And separately:

Created, ‘OPP CREATED’ through to being won, ‘OPP WON’ (Col B)
But the count should exclude any opportunities which have a overall stage of ‘OPP CANCELLED’ (Col P).

The opportunities have a unique Sale ID (Col Q) but these may not be in order in the actual worksheet.
Any suggestions?

Book9.xlsx
ABCDEFGHIJKLMNOPQ
1DATESTAGEINITIAL QUOTESALE FIGUREXXXXXXXXXXXOPP OVERALL STAGESALE ID
23/15/20OPP CREATED100XXXXXXXXXXXQUOTE SENT 290
33/15/20CUSTOMER INTERESTED100XXXXXXXXXXXQUOTE SENT 290
43/15/20QUOTE SENT100XXXXXXXXXXXQUOTE SENT 290
56/28/20OPP CREATED85XXXXXXXXXXXOPP CANCELLED530
66/28/20OPP CANCELLED85XXXXXXXXXXXOPP CANCELLED530
76/2/20OPP CREATED120XXXXXXXXXXXCUSTOMER INTERESTED124
86/2/20CUSTOMER INTERESTED120XXXXXXXXXXXCUSTOMER INTERESTED124
96/2/20CUSTOMER INTERESTED120XXXXXXXXXXXCUSTOMER INTERESTED124
106/2/20CUSTOMER INTERESTED120XXXXXXXXXXXCUSTOMER INTERESTED124
116/2/20CUSTOMER INTERESTED120XXXXXXXXXXXCUSTOMER INTERESTED124
126/2/20CUSTOMER INTERESTED120XXXXXXXXXXXCUSTOMER INTERESTED124
136/2/20CUSTOMER INTERESTED120XXXXXXXXXXXCUSTOMER INTERESTED124
143/16/20OPP CREATED45XXXXXXXXXXXOPP CREATED133
157/21/20OPP CREATED125XXXXXXXXXXXOPP CANCELLED546
167/21/20CUSTOMER INTERESTED125XXXXXXXXXXXOPP CANCELLED546
177/21/20CUSTOMER INTERESTED125XXXXXXXXXXXOPP CANCELLED546
187/21/20QUOTE SENT125XXXXXXXXXXXOPP CANCELLED546
197/21/20QUOTE SENT125XXXXXXXXXXXOPP CANCELLED546
207/21/20QUOTE SENT 125XXXXXXXXXXXOPP CANCELLED546
217/21/20QUOTE SENT 125XXXXXXXXXXXOPP CANCELLED546
227/21/20OPP CANCELLED125XXXXXXXXXXXOPP CANCELLED546
231/27/21OPP CREATED190XXXXXXXXXXXQUOTE SENT873
241/27/21QUOTE SENT190XXXXXXXXXXXQUOTE SENT873
251/27/21QUOTE SENT190XXXXXXXXXXXQUOTE SENT873
261/27/21QUOTE SENT190XXXXXXXXXXXQUOTE SENT873
276/23/20OPP CREATED130140.00XXXXXXXXXXXOPP WON944
286/23/20CUSTOMER INTERESTED130140.00XXXXXXXXXXXOPP WON944
296/23/20CUSTOMER INTERESTED130140.00XXXXXXXXXXXOPP WON944
306/23/20QUOTE SENT130140.00XXXXXXXXXXXOPP WON944
316/23/20QUOTE SENT130140.00XXXXXXXXXXXOPP WON944
326/23/20QUOTE SENT 130140.00XXXXXXXXXXXOPP WON944
336/23/20CUSTOMER INTERESTED130140.00XXXXXXXXXXXOPP WON944
346/23/20CUSTOMER INTERESTED130140.00XXXXXXXXXXXOPP WON944
356/23/20QUOTE SENT 130140.00XXXXXXXXXXXOPP WON944
366/23/20QUOTE SENT 130140.00XXXXXXXXXXXOPP WON944
376/23/20OPP WON130140.00XXXXXXXXXXXOPP WON944
Sheet1
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Want to be sure I'm reading this correctly
Created, ‘OPP CREATED’ through to a quote being sent, ‘QUOTE SENT’ (Col B)
Are you saying count those where both appear in column B for a sale ID (290,546,873 and 944 in the mini sheet)?

Does the exclusion apply to this part of the question, or only the second part?
 
Upvote 0
It’s the last Quote Sent for each unique sale id.
And separate formulae for the last Opp Won for each unique sale id.
Both should exclude if there was a status of cancelled for the unique sale id.

Hope that makes sense.
 
Upvote 0
Hope that makes sense.
Less than it did before unfortunately,
Created, ‘OPP CREATED’ through to a quote being sent, ‘QUOTE SENT’ (Col B)
Are we looking at both in column B, or one in B and the other in P?

It would help if you gave us the expected results for the example instead of leaving us to guess. Highlighting the rows that the results are taken from would also be useful.

Given that columns C:O are not relevant to the question, you could also hide them in excel before creating your mini sheet in order to reduce the clutter.
 
Upvote 0
Hope this helps:

Book9.xlsx
ABPQRST
1DATESTAGEOPP OVERALL STAGESALE ID
23/15/20OPP CREATEDQUOTE SENT 290QUOTE SENT 3
33/15/20CUSTOMER INTERESTEDQUOTE SENT 290OPP WON2
43/15/20QUOTE SENTQUOTE SENT 290
56/28/20OPP CREATEDOPP CANCELLED530
66/28/20OPP CANCELLEDOPP CANCELLED530
76/2/20OPP CREATEDOPP WON124
86/2/20CUSTOMER INTERESTEDOPP WON124
96/2/20CUSTOMER INTERESTEDOPP WON124
106/2/20CUSTOMER INTERESTEDOPP WON124
116/2/20OPP WONOPP WON124
126/2/20OPP WONOPP WON124
136/2/20OPP WONOPP WON124
143/16/20OPP CREATEDOPP CREATED133
157/21/20OPP CREATEDOPP CANCELLED546
167/21/20CUSTOMER INTERESTEDOPP CANCELLED546
177/21/20CUSTOMER INTERESTEDOPP CANCELLED546
187/21/20QUOTE SENTOPP CANCELLED546
197/21/20QUOTE SENTOPP CANCELLED546
207/21/20QUOTE SENT OPP CANCELLED546
217/21/20QUOTE SENT OPP CANCELLED546
227/21/20OPP CANCELLEDOPP CANCELLED546
231/27/21OPP CREATEDQUOTE SENT873
241/27/21QUOTE SENTQUOTE SENT873
251/27/21QUOTE SENTQUOTE SENT873
261/27/21QUOTE SENTQUOTE SENT873
276/23/20OPP CREATEDOPP WON944
286/23/20CUSTOMER INTERESTEDOPP WON944
296/23/20CUSTOMER INTERESTEDOPP WON944
306/23/20QUOTE SENTOPP WON944
316/23/20QUOTE SENTOPP WON944
326/23/20QUOTE SENT OPP WON944
336/23/20CUSTOMER INTERESTEDOPP WON944
346/23/20CUSTOMER INTERESTEDOPP WON944
356/23/20QUOTE SENT OPP WON944
366/23/20QUOTE SENT OPP WON944
376/23/20OPP WONOPP WON944
Sheet1
 
Upvote 0
Yep, that is close to what I was thinking. Now I just have to find a way to make that into a formula ?
 
Upvote 0
This works with office 365.
Excel Formula:
=IFERROR(ROWS(UNIQUE(FILTER(Q2:Q37,(B2:B37="QUOTE SENT")*(P2:P37<>"OPP CANCELLED")))),0)
Excel Formula:
=IFERROR(ROWS(UNIQUE(FILTER(Q2:Q37,(B2:B37="OPP WON")*(P2:P37<>"OPP CANCELLED")))),0)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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