ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding data only if adjacent to cell labeled "male"/"female" (https://www.excelbanter.com/excel-worksheet-functions/249201-adding-data-only-if-adjacent-cell-labeled-male-female.html)

lovesrubbaducky

Adding data only if adjacent to cell labeled "male"/"female"
 
I have a spreadsheet that has this general format:

column A column B Column C Column D
3 M
5 F
2 M
6 F
Total Females: 11
Total Males: 5

For all the cells in Column A that are adjacent to a cell in column B
containing a letter "F", I would a formula to add those numbers, and place
the sum in column D (where I've typed an "11" for Total Females). I'd like
the same for all cells in column A that are adjacent to an "M" to be totaled
next to "Total Males".

Any solutions?

thank you

Jacob Skaria

Adding data only if adjacent to cell labeled "male"/"female"
 
'for female count
=SUMIF(B:B,"F",A:A)

If this post helps click Yes
---------------
Jacob Skaria


"lovesrubbaducky" wrote:

I have a spreadsheet that has this general format:

column A column B Column C Column D
3 M
5 F
2 M
6 F
Total Females: 11
Total Males: 5

For all the cells in Column A that are adjacent to a cell in column B
containing a letter "F", I would a formula to add those numbers, and place
the sum in column D (where I've typed an "11" for Total Females). I'd like
the same for all cells in column A that are adjacent to an "M" to be totaled
next to "Total Males".

Any solutions?

thank you



All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com