You get answers for both question.

1. What if there are 300 rows for 3 coloumns A,B,C? FOR EXAMPLE:
in post 13 from FlameRetired and also mine answer post 15
2. What if there are 300 rows for only 2 coloumns A,B?
in post 9 from FlameRetired

why you ask again? Did you try that formulas?