Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find a character in a textstring
I would like to find a character (in my case the letter S) in a list of
textstrings, and then return the textstrings containing "S" , as well as the two other columns that correspond to it . My columns are as follows 36359 LP 21227.78 36360 FLS 16218.75 36361 FS 14471.59 36362 FS 30109.59 36363 FS 7801.26 36364 FAP 29816.75 36365 FLS 16875 So if I wanted to search for "S" in column 2, I would return; 36360 FLS 16218.75 36361 FS 14471.59 36362 FS 30109.59 36363 FS 7801.26 36365 FLS 16875 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find a character in a textstring
Data/Filter/Autofilter. Click the drop arrow in column 2, select custom.
Then Show rows where column 2 "contains" S. "Vix" wrote: I would like to find a character (in my case the letter S) in a list of textstrings, and then return the textstrings containing "S" , as well as the two other columns that correspond to it . My columns are as follows 36359 LP 21227.78 36360 FLS 16218.75 36361 FS 14471.59 36362 FS 30109.59 36363 FS 7801.26 36364 FAP 29816.75 36365 FLS 16875 So if I wanted to search for "S" in column 2, I would return; 36360 FLS 16218.75 36361 FS 14471.59 36362 FS 30109.59 36363 FS 7801.26 36365 FLS 16875 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find a character in a textstring
A VBA solution:
Sub x() Dim rng2 As Range Set rng2 = Sheets("sheet2").Range("A2") With Sheets("Sheet1") lastrow = .Cells(Rows.Count, "A").End(xlUp).Row For r = 2 To lastrow If InStr(1, .Cells(r, "B"), "S") < 0 Then .Cells(r, "A").Resize(, 3).Copy rng2 Set rng2 = rng2.Offset(1, 0) End If Next r End With End Sub "JMB" wrote: Data/Filter/Autofilter. Click the drop arrow in column 2, select custom. Then Show rows where column 2 "contains" S. "Vix" wrote: I would like to find a character (in my case the letter S) in a list of textstrings, and then return the textstrings containing "S" , as well as the two other columns that correspond to it . My columns are as follows 36359 LP 21227.78 36360 FLS 16218.75 36361 FS 14471.59 36362 FS 30109.59 36363 FS 7801.26 36364 FAP 29816.75 36365 FLS 16875 So if I wanted to search for "S" in column 2, I would return; 36360 FLS 16218.75 36361 FS 14471.59 36362 FS 30109.59 36363 FS 7801.26 36365 FLS 16875 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace | Excel Worksheet Functions | |||
Find if nth char = specific character.. | Excel Discussion (Misc queries) | |||
Find a character to sort on in an Excel cell if not the 1st charac | Excel Worksheet Functions | |||
find a cells from a range of cell | Excel Worksheet Functions | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) |