Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Vix Vix is offline
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
Find if nth char = specific character.. nastech Excel Discussion (Misc queries) 6 November 24th 05 02:57 PM
Find a character to sort on in an Excel cell if not the 1st charac drrons Excel Worksheet Functions 1 November 11th 05 11:43 PM
find a cells from a range of cell kelvintaycc Excel Worksheet Functions 2 April 2nd 05 07:20 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 05:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"