Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Excel's version of group by + having

Could you please help me with the following.

If Excel table was a relational database table, this is what I would want to do:

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

D3 should have a value of 8 and be recalculated whenever rows are added. I am familiar with COUNT/COUNTA and OFFSET functions in case they need to be used. Pivot table will not work, since I don’t need all possible A values, just specific one. The solution should work for both Excel and Libre Office. If it also works for Google Sheets, it will be even better.

Thank you for your help.

>Solution :

The following formula should do the trick:

=sumif(A1:B6, "=x", B1:B6)

enter image description here

You can change the ranges to whatever you need

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading