VBA: Delete duplicate searched string

sr1111

New Member
Joined
Sep 2, 2022
Messages
46
Office Version
  1. 2013
  2. 2011
  3. 2010
  4. 2007
Platform
  1. Windows
VBA: Delete duplicate searched string.
I have attached an example input, string to search, and output sheet in an excel workbook.

Input Sheet:

VBA keep only one searched string.xlsx
ABCDE
2#VBA: keep only one searched string searched string searched string searched string. #VBA: keep only searched string one searched string. The list of search stings searchedCSV string searched string is given in sheet 2. In sheet1, with #VBA check if a given string is CSV searched string found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with CSV searched string multiple column data in multiple rows as well as in a CSV or text file.
3
4searched string searched string #VBA: keep only one searched string. #VBA: keep only one searched string. searched string searched string searched stringThe list of search stings is given in sheet 2. In sheet1, with #VBA check if a given string is found more than once #VBA #VBA #VBA #VBA #VBA #VBA #VBA #VBA #VBA #VBA #VBA #VBA in a paragraph/line. If found more than once then keep only one. #VBA #VBA #VBA #VBA I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
5
6#VBA: keep only one searched string. #VBA: keep only one searched string. The list of search stings is given in sheet 2. In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file. #VBA: keep only one searched string. #VBA: keep only one searched string. searched string searched string searched string searched string The list of search stings is given in sheet 2. searched string searched string searched string searched string In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
7
8
9
10
11#VBA: #VBA keep only one searched string. #VBA: #VBA #VBAkeep only one searched string. searched string searched string searched string searched string searched string In sheet1, with #VBA check if a given string is found more than #VBA once in a paragraph/line. If found more than #VBA once then keep only one. #VBA: keep only one searched string. The list of search stings is given in sheet 2. In sheet1, with #VBA check if a given string is found more than #VBA once in a paragraph/line. If found more than #VBA once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
12
13
14#VBA: keep only one searched string. In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file. #VBA: keep only one searched string. In sheet1, with #VBA check if a paragraph/line given string is found more than once in a paragraph/line paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
Input


String to search Sheet:

VBA keep only one searched string.xlsx
ABCDEFG
1
2paragraph/line
3
4searched string
5#VBA
6
7
8
9
String to search


Output Sheet:

VBA keep only one searched string.xlsx
ABCDE
2#VBA: keep only one searched string . #VBA: keep only searched string one . The list of search stings searchedCSV string searched string is given in sheet 2. In sheet1, with #VBA check if a given string is CSV searched string found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with CSV searched string multiple column data in multiple rows as well as in a CSV or text file.
3
4searched string #VBA: keep only one searched string. #VBA: keep only one searched string. searched string searched stringThe list of search stings is given in sheet 2. In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
5
6#VBA: keep only one searched string. #VBA: keep only one searched string. The list of search stings is given in sheet 2. In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file. #VBA: keep only one searched string. #VBA: keep only one searched string. The list of search stings is given in sheet 2. searched string In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
7
8
9
10
11#VBA: keep only one searched string. #VBA: keep only one searched string. searched string In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. #VBA: keep only one searched string. The list of search stings is given in sheet 2. In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
12
13
14#VBA: keep only one searched string. In sheet1, with #VBA check if a given string is found more than once in a paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file. #VBA: keep only one searched string. In sheet1, with #VBA check if a paragraph/line given string is found more than once in a paragraph/line paragraph/line. If found more than once then keep only one. I want to do this both in an excel sheet with multiple column data in multiple rows as well as in a CSV or text file.
Output
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top