Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default searching for values in excel and copy them to another worksheet

Hello,
I have a problem with vba in excel
I want to search for a value in a worksheet and then copy the data that
lies beneath it to another worksheet.

Thx



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default searching for values in excel and copy them to another worksheet

One method is as follows

Sub Demo
Dim rngR as Range

Set rngR = ActiveSheet.Cells.Find("TheText")
If rngR is Nothing Then
'value not found
MsgBox "Not Found"
Else
'get value of cell below
MsgBox rngR.Offset(1,0).Value
End If

End Sub

Look up the Find method in help to check out the various
options.

Cheers,
Dave
-----Original Message-----
Hello,
I have a problem with vba in excel
I want to search for a value in a worksheet and then copy

the data that
lies beneath it to another worksheet.

Thx



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/

.

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
Copy values of worksheet a to workbook b Nev Excel Discussion (Misc queries) 5 April 8th 09 09:35 PM
How do I copy cells from one worksheet to another based on values Vickynh Excel Worksheet Functions 2 October 4th 08 05:18 AM
I want to copy rows with values 0 to another worksheet automatica Skeletor Excel Worksheet Functions 4 September 24th 08 11:47 PM
If statement...copy values of cells on another worksheet. heater Excel Discussion (Misc queries) 2 August 31st 05 11:05 PM
Formula for Searching & matching two values in excel Chris Excel Discussion (Misc queries) 1 January 7th 05 04:34 PM


All times are GMT +1. The time now is 10:39 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"