I have a column filter in excel (for example, the value are A, B, C).
I want to copy each value to new different sheets.
I use the code that have been advised in other post as below:
1 read range of the first file (DT_Unfiltered)
2 assign DT_Filtered = DT_Unfiltered.Select("[Column1] = ‘Criteria1’").CopyToDatatable
3 write range to the second (DT_Filtered)
However, the problem I get is sometime my original file (filtered file) has full 3 values (A, B, C), but sometimes it just have A & B, so the code will be wrong & get bug. (because it cannot find C).
Could you please help me? thank you!