Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel as database
Hi guys,
I am a newbie to VBA. I am trying to use excel as a database. I want to search for some value in the database, copy the whole row and paste on another worksheet for viewing. The qn is how do i select a range from a cell so i can do a find for the value and then copy the row in which the cell is, and then paste on another worksht? pls advise thanks alan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel as database
to reference the database
set rng = Range("A1").CurrentRegion a specific column in that rng Dim rng as Range Dim rng1 as Range Dim sStr as String set rng1 = nothing set rng = Range("A1").CurrentRegion.Columns(3).Cells sStr = "ABCD" set rng1 = rng.Find(What:=sStr) if not rng1 is nothing then rng1.EntireRow.copy Destination:= _ Worksheets("Sheet3").Cells(rows.count,1).End(xlup) (2) End if See help on the find method for additional arguments and/or turn on the macro recorder while you do a find manually. -- Regards, Tom Ogilvy "alanq" wrote in message om... Hi guys, I am a newbie to VBA. I am trying to use excel as a database. I want to search for some value in the database, copy the whole row and paste on another worksheet for viewing. The qn is how do i select a range from a cell so i can do a find for the value and then copy the row in which the cell is, and then paste on another worksht? pls advise thanks alan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update Excel Database via Access Main Database with a script | New Users to Excel | |||
Convert Excel database to dBASE database? | Excel Discussion (Misc queries) | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
How to make reference to database and if true copy from database? | Excel Discussion (Misc queries) | |||
Moved database, how do I change link to the database in excel | Excel Discussion (Misc queries) |