Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default find text in a sheet

How can I find a specific string in a worksheet and then select a specific
range of cells underneath this cell with the text entry and then calculate
something with the selected data?
Could somebody provide some sample code?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default find text in a sheet

Option Explicit

Sub FindText()
Dim oCell As Range

For Each oCell In ActiveSheet.UsedRange
If oCell = "Some Text" Then
Range(oCell.Offset(1, 0), oCell.Offset(15, 4)).Select
'do something with this range
End If
Next oCell


End Sub

"bandy2000" wrote:

How can I find a specific string in a worksheet and then select a specific
range of cells underneath this cell with the text entry and then calculate
something with the selected data?
Could somebody provide some sample code?
Thanks

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 common text in cell in column in sheet then return total amou leeona Excel Worksheet Functions 1 June 7th 08 04:43 AM
How do I repeatedly find text in an Excel sheet? H Excel Worksheet Functions 1 March 15th 06 02:40 PM
Find text in cell, copy row to new sheet Ajay Excel Discussion (Misc queries) 6 June 29th 05 08:40 AM
how to find and copy values on sheet 2, based on a list on sheet 1 evanmacnz Excel Programming 4 February 7th 05 08:33 PM
Find all text instances in a sheet and add one number from each row Greg Excel Discussion (Misc queries) 1 January 31st 05 11:45 PM


All times are GMT +1. The time now is 11:31 PM.

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"