Summing figures with duplicate conditions and preset formula

Joined
Nov 11, 2021
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I'm hoping to get a formula that can help me calculate the answer for F5.
The "Gifts" column has a preset formula/criteria to derive the "1" and "0". So to know the total number of gifts i have put in the formula for F2.
But as each household is only entitled to one gift, i'm hoping to get the total number of gifts for each unique address (there are thousands of different addresses).

Can any kind souls help?

Thank you very much!


Excel question.jpg
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try COUNTIFS:
Code:
=SUM(IF($C$2:$C$10=1,1/COUNTIFS($C$2:$C$10,1,$B$2:$B$10,$B$2:$B$10)))
if C column is textstring (that you are using "1" in for mula, but i guess it is value due to cells alight=right) use "1" in stead of 1

For whom with Ex2016 or older: Confirm with Ctrl-Shift-Enter Combination.
 
Upvote 0
Solution
Try COUNTIFS:
Code:
=SUM(IF($C$2:$C$10=1,1/COUNTIFS($C$2:$C$10,1,$B$2:$B$10,$B$2:$B$10)))
if C column is textstring (that you are using "1" in for mula, but i guess it is value due to cells alight=right) use "1" in stead of 1

For whom with Ex2016 or older: Confirm with Ctrl-Shift-Enter Combination.
Hi Thanks for the reply.

However, i use the code with my data and the error message was "#value!".
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

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