I am new in this forum and would like to understand the VBA macro, Just wanna know how can I count the number of entries in a row per criteria. I have the Unique ID, and have a couple of data and will insert the count on Count Y and Count X.

ID | Data 1 | Data 2 | Data 3 | Data 4 | Data 5 | Data 6 | Count Y | Count X |

1 | X | Y | X | X | X | 1 | 4 | |

2 | X | X | X | 0 | 3 | |||

3 | Y | Y | Y | 3 | 0 | |||

4 | Y | Y | Y | X | X | 2 | 2 | |

5 | 0 | 0 | ||||||

6 | X | X | Y | Y | 1 | 2 | ||

7 | Y | Y | Y | X | X | 3 | 2 |