LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Excel Database and Macros

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
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
macros to query a database tannu Excel Programming 9 March 3rd 09 12:18 AM
Macros VBA and Converting Form to Database IMS Lori Excel Discussion (Misc queries) 7 January 15th 07 06:19 PM
keybd_event versus SendKeys to open Access database with macros disabled Paul Martin Excel Programming 3 October 3rd 06 11:03 PM
Excel, Macros, Database Sun Excel Programming 1 May 23rd 05 07:51 PM
Macros to tranfer data to database Scribner Excel Discussion (Misc queries) 1 February 10th 05 01:08 AM


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