Extra IF condition required

ollyhughes1982

Well-known Member
Joined
Nov 27, 2018
Messages
677
Office Version
  1. 365
Platform
  1. MacOS
Hi,

I have the below formula in my workbook and want to add in another IF statement condition, so that the formula also only counts values where a condition is met in column D of the 'All Completed Runs' worksheet. The condition that column D in the 'All Completed Runs' needs to meet is “United Kingdom”.

=IF('All Completed Runs'!B3="","",SUMPRODUCT(('All Completed Runs'!BW3:BW2002<>"")/COUNTIF('All Completed Runs'!BW3:BW2002,'All Completed Runs'!BW3:BW2002&"")))

I have tried adding in an IF statement just before the SUMPRODUCT, but this doesn’t work.

Thanks in advance!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
If the condition only needs to be in the Count?

Maybe try,

=IF('All Completed Runs'!B3="","",SUMPRODUCT(('All Completed Runs'!BW3:BW2002<>"")/COUNTIFS('All Completed Runs'!BW3:BW2002,'All Completed Runs'!BW3:BW2002&"",'All Completed Runs'!D3:D2002,"United Kingdom")))
 
Upvote 0
  1. What worksheet name is this formula in?
  2. In 'All Completed Runs', is the data in column BW numeric, text or some of each?
Instead of your existing formula, I think this should do the same thing
Excel Formula:
=IF('All Completed Runs'!B3="","",ROWS(UNIQUE(FILTER('All Completed Runs'!BW3:BW2002,'All Completed Runs'!BW3:BW2002<>""))))

.. and with the extra condition
Excel Formula:
=IF('All Completed Runs'!B3="","",ROWS(UNIQUE(FILTER('All Completed Runs'!BW3:BW2002,('All Completed Runs'!BW3:BW2002<>"")*('All Completed Runs'!D3:D2002="United Kingdom")))))
 
Upvote 0
  1. What worksheet name is this formula in?
  2. In 'All Completed Runs', is the data in column BW numeric, text or some of each?
Instead of your existing formula, I think this should do the same thing
Excel Formula:
=IF('All Completed Runs'!B3="","",ROWS(UNIQUE(FILTER('All Completed Runs'!BW3:BW2002,'All Completed Runs'!BW3:BW2002<>""))))

.. and with the extra condition
Excel Formula:
=IF('All Completed Runs'!B3="","",ROWS(UNIQUE(FILTER('All Completed Runs'!BW3:BW2002,('All Completed Runs'!BW3:BW2002<>"")*('All Completed Runs'!D3:D2002="United Kingdom")))))
Brilliant, this worked perfectly. Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,941
Members
449,094
Latest member
teemeren

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