Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I have started to implement a database in Excel. In Sheet1, I have
several fields including Reference Number, First Name, Surname, Area, and Visit Date. What I want to do is copy the data into sheet2 by using a macro. I have been provided the following macro:- dim i i =1 do until worksheets("sheet1").cells(i,1)="" worksheets("sheet2").cells(i,1)=worksheets("sheet1 ").cells(i,1) i = i + 1 loop When I run this macro, it only copies the first column from sheet1 into sheet2. Does anyone know what I can do to the macro to copy over all the contents of sheet1 into sheet2? Also, I wanted to know how I can amend the macro so that when the data is copied from sheet1 to sheet2 then only the data relating to a specific Area will be displayed in sheet2, for example, looking at the Area field, sheet2 will show all the visits undertaken in USA. Finally, i wanted to know how I can amend the macro so that when the data is copied from sheet1 to sheet2 then only the data relating to the visits conducted in a specific year are displayed, for example, looking at the Visit Date field, sheet2 will show all the visits undertaken in 2004. Any help will be appreciated. Kind Regards, Roopesh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macros to query a database | Excel Programming | |||
Macros VBA and Converting Form to Database | Excel Discussion (Misc queries) | |||
keybd_event versus SendKeys to open Access database with macros disabled | Excel Programming | |||
Excel, Macros, Database | Excel Programming | |||
Macros to tranfer data to database | Excel Discussion (Misc queries) |