I have a list of data, exported to excel, which has ‘TRUE’ or ‘FALSE’ in a column, based on if they checked a box on a previous form.

For Example, in column ‘D’ the header (D1) is ‘MALE?’ and then values D2 to D1000 are either ‘TRUE’ or ‘FALSE’ depending on the answer.

Male?

TRUE

FALSE

TRUE

TRUE

FALSE

ETC ETC….

I need to gather 3 pieces of information from this data, the first is, a count of how many Males in a row filled out the form… The second is to find out how many Females in a row filled out the form… (I have managed to code and solve both these issues)…

However, the one I am struggling with is, how to work out and get a count of how many alternating male and females filled out the form. And display this information on a large scale.

This is my goal:

E.G:

D E F G

Male? Male Group Female Group M/F Group

TRUE

TRUE

TRUE 3

FALSE

FALSE 2

TRUE

FALSE

TRUE

FALSE 5

FALSE 2

TRUE

TRUE 2

FALSE

TRUE 3

However I am struggling to get column G to work as expected. I am trying to avoid using nested ‘IF’ statements to complete this as it could be 20+ alternating male and females etc.

Can anyone help?

By: Martyn

I don’t think my post was very clear because I couldn’t do a table, hopefully this is better?

D____________E_________________F__________________G

Male?_______Male Group______Female Group______M/F Group

TRUE

TRUE

TRUE_______3

FALSE

FALSE__________________________2

TRUE

FALSE

TRUE

FALSE_______________________________________________5

FALSE__________________________2

TRUE

TRUE_______2

FALSE

_______________________________________________3