(Solved) – Removing duplicates in comma seperated string in every cell of a coloumn in MS Access

(solved)-–-removing-duplicates-in-comma-seperated-string-in-every-cell-of-a-coloumn-in-ms-access

I am building an Access database which imports data from an excel file. Unfortunately, one field which is imported, contains multiple IP addresses with duplicates separated by a comma. I want to remove the duplicates from that string, so I can separate them afterwords and paste individually in a column with only the distinct IP addresses remaining.
My table looks something like this:

Host_name | IP Address 
----------------------
mba234    192.168.1.1, 192.168.1.1, 192.168.1.3
mba678    158.234.12.4, 123.123.123.23, 158.234.12.4, 123.123.123.23, 156.234.567.12
etc.

And in the end it should look like this:

Host name | IP Address 
----------------------
mba234    192.168.1.1, 192.168.1.3
mba678    158.234.12.4, 123.123.123.23, 156.234.567.12
etc.

As the length of the column varies for each import, I need a solution for the entire column: IP Address. So far I only found solutions for an individual cell or a predefined array of cells but not for an entire column with random amount of rows…

Can you help me out?

Leave a Reply

Your email address will not be published. Required fields are marked *