Countif- Visible Cells in Filter mode with additional values return

Rita Rees

New Member
Joined
May 13, 2022
Messages
1
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi – there was a formula solution posted (shown below), that allows a count of visible cells only, for a specific ‘criteria’ needed only – i.e. using the dummy data below, it would allow me a count of only ‘Closed won’ fields, that would also work when filtering other columns, like date or client etc

=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B50,ROW(B2:B50)-MIN(ROW(B2:B50)),,1))*(B2:B50="Closed won"))

My question is how can I expand on this formula to also get a return on what the £ values shown in another column would be when using this formula?
i.e. using the dummy info below, I'm using the formula to count, 'wins' and 'losses' (Data 1 column) and then having a simple formula to calculate a win rate, but I also need to return what the £ values would be when using this formula (in this case using value 1 or value 2 columns), so that once it 'counts' the number of wins/losses, it also gives me the total £ values of those selected – that will also work when filtering other columns
Are you able to help with this?
Thanking you in advance



Data 1Data 2Data 3Data 4Data 5Value 1Value 2
Suspect01/04/202301/06/202301/08/202301/09/2023£80,000,000£1,000,000
Negotiation15/10/202103/12/202101/12/202103/05/2022£30,000,000£22,800,000
Negotiation28/09/202015/03/202109/03/202101/07/2021£17,371,798£8,405,000
Closed won01/06/202230/09/202201/01/202301/03/2023£15,000,000£15,000,000
Prospect17/10/202214/11/202216/01/202313/02/2023£15,000,000£6,750,000
Prospect17/10/202214/11/202216/01/202313/02/2023£15,000,000£5,250,000
Bidding23/08/202108/04/202223/08/202228/02/2023£13,758,412£6,879,206
Bidding23/08/202108/04/202223/08/202228/02/2023£13,758,412£6,780,932
Closed won22/03/202205/04/202222/07/202101/06/2022£10,000,000£10,000,000
Closed won05/11/202117/12/202125/11/202129/07/2022£9,500,000£9,500,000
Bidding26/10/202113/12/202127/05/202201/11/2022£9,000,000£4,959,000
Closed won24/02/202126/03/202102/02/202128/06/2021£9,000,000£9,000,000
Closed won07/06/202114/06/202105/08/202111/10/2021£9,000,000£9,000,000
Closed won10/03/202328/04/202330/06/202329/09/2023£4,000,000£4,000,000
Closed won29/07/202231/08/202230/09/202230/11/2022£3,000,000£3,000,000
Suspect01/06/202313/07/202302/03/202402/05/2024£2,500,000£2,500,000
Closed won02/08/202106/09/202121/12/202102/05/2022£2,500,000£2,500,000
Closed lost05/07/202109/08/202127/09/202130/04/2022£2,200,000£0
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi & welcome to MrExcel.
Rather than using volatile functions, why not use a helper column instead like
++Fluff.xlsm
ABCDEFGHIJK
1Data 1Data 2Data 3Data 4Data 5Value 1Value 2
2Suspect01/04/202301/06/202301/08/202301/09/2023£80,000,000£1,000,00015
3Negotiation15/10/202103/12/202101/12/202103/05/2022£30,000,000£22,800,000134000000
8Bidding23/08/202108/04/202223/08/202228/02/2023£13,758,412£6,879,2061
9Bidding23/08/202108/04/202223/08/202228/02/2023£13,758,412£6,780,9321
11Closed won05/11/202117/12/202125/11/202129/07/2022£9,500,000£9,500,0001
12Bidding26/10/202113/12/202127/05/202201/11/2022£9,000,000£4,959,0001
13Closed won24/02/202126/03/202102/02/202128/06/2021£9,000,000£9,000,0001
14Closed won07/06/202114/06/202105/08/202111/10/2021£9,000,000£9,000,0001
15Closed won10/03/202328/04/202330/06/202329/09/2023£4,000,000£4,000,0001
17Suspect01/06/202313/07/202302/03/202402/05/2024£2,500,000£2,500,0001
18Closed won02/08/202106/09/202121/12/202102/05/2022£2,500,000£2,500,0001
19Closed lost05/07/202109/08/202127/09/202130/04/2022£2,200,000£01
20
Main
Cell Formulas
RangeFormula
K2K2=COUNTIFS(B:B,"Closed won",I:I,1)
K3K3=SUMIFS(G:G,B:B,"Closed won",I:I,1)
I2:I3,I8:I9,I11:I15,I17:I19I2=SUBTOTAL(3,B2)
Named Ranges
NameRefers ToCells
_FilterDatabase=Main!$B$1:$I$18K2:K3
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,060
Latest member
mtsheetz

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