How to remove unwanted sentence and rows in an excel

Hi Team,

I have merged 3 sheets into one sheet and after merging I can see duplicates header and some extra rows with words and it is everywhere in between before starting the next set of rows and this is dynamic everytime when I merge this unwanted rows can be in any cell…how do I remove those?

Since i don’t see a pattern to filter and remove,

I would suggest to read the excel into a data table and start looping

Check the value in column A and see whether the value contains number only. If yes - no action required, else delete the entire row in data table

Final output could be placed in same sheet or different sheet

@bhanu.priya2,

I would suggest to handle this while merging. While merging use append range or similar logic to avaid adding headers.

@bhanu.priya2

Read into datatable

Then use dt.AsEnumerable.Where(function(x) System.Text.RegularExpressions.Regex.IsMatch(x(0).ToString,"^\d+$")).CopyToDatatable

This will give only rows with number in the first column

Write back the filtered dt to excel

Or before appending also the same
Formula can be used

Cheers