Excel_beginner_newb
New Member
- Joined
- Oct 10, 2015
- Messages
- 3
Hi everyone,
I need help writing a formula for our laboratory work. In essence, our log indicates this:
Column A: Subject # (unique identifier)
Column B: Status (x if deceased, blank if alive)
Column C: Location Number
Basically, there can be multiple subjects in one location. I would like to write a formula that will tell us how many locations are currently operating. Firstly, the formula only accounts for living subjects (ie. their cell is BLANK in column B). Then, I need to sum up the number of unique locations from column C (ignoring duplicates). Column A is not relevant at this moment. All the data starts in row 2. Row 1 is my headers, and I am trying to write the formula in D1 and have floating headers so it is easy to keep track.
I tried the following formula:=IF(ISBLANK($B:$B),SUM(IF(FREQUENCY($C:$C,$C:$C)>0,1)))
But it counts all the subjects, even those with an "x" in corresponding cell B. Can someone help me with my formula? I think I need a way to match the conditions? Meaning, only if both B is blank, and C has a value, then sum up the number of unique cells from C.
Thank you!
I need help writing a formula for our laboratory work. In essence, our log indicates this:
Column A: Subject # (unique identifier)
Column B: Status (x if deceased, blank if alive)
Column C: Location Number
Basically, there can be multiple subjects in one location. I would like to write a formula that will tell us how many locations are currently operating. Firstly, the formula only accounts for living subjects (ie. their cell is BLANK in column B). Then, I need to sum up the number of unique locations from column C (ignoring duplicates). Column A is not relevant at this moment. All the data starts in row 2. Row 1 is my headers, and I am trying to write the formula in D1 and have floating headers so it is easy to keep track.
I tried the following formula:=IF(ISBLANK($B:$B),SUM(IF(FREQUENCY($C:$C,$C:$C)>0,1)))
But it counts all the subjects, even those with an "x" in corresponding cell B. Can someone help me with my formula? I think I need a way to match the conditions? Meaning, only if both B is blank, and C has a value, then sum up the number of unique cells from C.
Thank you!