LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Extract rows with specific text in a column

Hi,

I've got a large spreadsheet that I'd like to extract all the rows with the
words "PROVISIONAL QUANTITY" or "PROVISIONAL SUM" within the text in a
particular column.
ie - Some cells in Column C have the words "PROVISIONAL QUANTITY" or
"PROVISIONAL SUM" in the text somewhere. I need the data from the entire
row if col C has these words in the cell text.

I suspect this could be done by either 1) deleting all rows that dont
contain these words, or 2) selecting all the rows with the words and copying
into a blank worksheet.
Is there an easy way to achieve this or is a macro required. If macro
required, any help on the below macro would be great.

Sub ProvSumCopy()
Dim rng As Range
Dim cell As Range
Dim start_str As Integer

Set rng = Selection
For Each cell In rng
start_str = InStr(cell.Value, "PROVISIONAL SUM")
If start_str Then
ActiveRow.Select
End If
start_str = InStr(cell.Value, "PROVISIONAL QUANTITY")
If start_str Then
ActiveRow.Select
End If

Next

End Sub

Thanks
Troy









 
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
Need to extract specific data from a text column Homecomingwarrior Excel Worksheet Functions 2 April 12th 10 11:10 PM
Extract specific text NunRacer Excel Worksheet Functions 15 July 30th 07 01:52 AM
Extract specific value from a long text string Dinesh Excel Worksheet Functions 4 August 11th 06 04:24 AM
Extract Specific Text mjmoore Excel Worksheet Functions 2 June 2nd 06 08:28 PM
extract specific info from cells in a column Herman New Users to Excel 1 October 27th 05 03:01 AM


All times are GMT +1. The time now is 08:10 AM.

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

About Us

"It's about Microsoft Excel"