Hi!

I wish someone can help me with this.

I want to know if there is a formula that can be used for cells C23 and C24. In C23, I want to get the percentage of persons in D918 that has the same preference in H2. For C24, I want to get the percentage of persons in D918 that has the same preference in 4.

Futher, I want to know if there is a formula for Cells D23 and D24. In D23, i want to show the percentage of person 1&#39;s preference based on cells F19:K19. For D24, i want to show the percentage of person 2&#39;s preference based on cells F19:k19.

Please see attached excel file as this is my sample.

2. Code:
```In C23, I want to get the percentage of persons in D9:D18 that has the same preference in H2.
=COUNTIF(D9:D18,H2)*100/COUNT(D9:D18)

For C24, I want to get the percentage of persons in D9:D18 that has the same preference in 4
=COUNTIF(D9:D18,H4)*100/COUNT(D9:D18)

total Percentage of voters of Person 1's preference (i.e. if person 1 has preference of 2 then the cell D23 should have the total percentage of candidate 2 as seen in Cell G19
=INDEX(F19:J19,1,H2)

total Percentage of voters of Person 2's preference (i.e. if person 2 has preference of 2 then the cell D24 should have the total percentage of candidate 2 as seen in Cell G19)
=INDEX(F19:J19,1,H4)```
I think this is what you are tying to do.

HTH,
Maud

3. ## The Following User Says Thank You to Maudibe For This Useful Post:

4. Thank you for this Maudibe!

This is what I'm looking for!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•