Hi Roy,
Thanks for your kind response. Below are the observations.
1) There are 4 excel files in the folder-Screenshot attached(screenshot - 1).
2) Data is there in Test File - 1 , Test File - 2 & Test File - 4 in column "M".
3) No data in Test File - 3 in column "M".
4) After running the above code, the count of unique values is returned only for Test File - 1, Test File - 2 & Test File - 3.
5) Unique values count for Test File - 4 is returned as 0. however, there are 6 unique values in column "M". The screenshot is attached(screenshot -2).
6) Attaching all the 4 excel files that are there in the folder.