Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy values of worksheet a to workbook b | Excel Discussion (Misc queries) | |||
How do I copy cells from one worksheet to another based on values | Excel Worksheet Functions | |||
I want to copy rows with values 0 to another worksheet automatica | Excel Worksheet Functions | |||
If statement...copy values of cells on another worksheet. | Excel Discussion (Misc queries) | |||
Formula for Searching & matching two values in excel | Excel Discussion (Misc queries) |