Scenario:
You have a text file list of domains, all types of TLDs but you want to sort them to find just the .co.uk ones
Open / import the list in Excel
I'll assume the domain list is in column A
In column B, add the following formula:
=IF(ISNUMBER(FIND(".co.uk",A1)),"UK", "")
Copy it...