Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Mastersheet to Worksheet data copy - macros?

I'm out in Tanzania working for a school and I'm helping out with the school
accounts. Up until now there has been a lot of fraud so we are trying to
consolidate the information and put it all on excel or perhaps access to
ensure that we have an electronic record, as the cashier and accountant have
been using hard records and a lot of money has been going walk-about.

We have created an excel document with a master copy listing all 460
students on one worksheet. The categories a FORM, FORM STREAM, SEX,
STUDENT TYPE, BOARDER OR DAY STUDENT, SPONSORED, CATEGORY OF SPONSORSHIP,
FIRST NAME, LAST NAME. We then have 1st Quarter Fees and whether or not they
are in credit or debit, going all the way to 4th Quarter. We also want to
have Pocket Money and Medical Expenses on the same Worksheet.

Here's the catch. We think the easiest way to do everything right now, is to
print off a page containg the student's NAME, FORM, B/D, SPONSORED?. And then
we would have two tables, one listing the School Fees details and another
listing Pocket Money and Medical Expenses.

Is there anyway of creating a macro or some sort of rule that states: Please
create 460 sheets from the mastercopy containing NAME, FORM, B/D, SPONSORED
and both tables?

Please help!!
Thank you
--
DCT Mvumi School
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Mastersheet to Worksheet data copy - macros?

The code below expects the master sheet in the workbook to be called
"Summary" and ther is a 2nd worksheet called Template that will be copied for
each student. The code creates the worksheet name using the student last and
first name. I would sort the students by first anem and last name before
running macro so the worksheets are alphebitzed to make it easier to find a
stundent. There is no limit to the the number of worksheets that excel can
use except the more sheets you have the more memory you need on your PC.

Sub CreateSheets()

'Create a template sheet to be copied for each student
Set TemplateSht = Sheets("Template")

Set SummarySht = Sheets("Summary")
'skip header row on summary sheet
SumRowCount = 2

With SummarySht
Do While .Range("A" & SumRowCount) < ""

LastName = .Range("A" & SumRowCount)
FirstName = .Range("B" & SumRowCount)
SPONSORED = .Range("C" & SumRowCount)
'add more data here that you want to copy from summmary sheet

'Add New sht by copying template
TemplateSht.Copy after:=Sheets(Sheets.Count)
Set NewSht = ActiveSheet
'change name or workshheet to match studnet name
NewSht.Name = LastName & "_" & FirstName

With NewSht
'add more code here to put data into new worksheet
.Range("B2") = SPONSORED
End With

SumRowCount = SumRowCount + 1
Loop

End With

End Sub


"DCT Mvumi School" wrote:

I'm out in Tanzania working for a school and I'm helping out with the school
accounts. Up until now there has been a lot of fraud so we are trying to
consolidate the information and put it all on excel or perhaps access to
ensure that we have an electronic record, as the cashier and accountant have
been using hard records and a lot of money has been going walk-about.

We have created an excel document with a master copy listing all 460
students on one worksheet. The categories a FORM, FORM STREAM, SEX,
STUDENT TYPE, BOARDER OR DAY STUDENT, SPONSORED, CATEGORY OF SPONSORSHIP,
FIRST NAME, LAST NAME. We then have 1st Quarter Fees and whether or not they
are in credit or debit, going all the way to 4th Quarter. We also want to
have Pocket Money and Medical Expenses on the same Worksheet.

Here's the catch. We think the easiest way to do everything right now, is to
print off a page containg the student's NAME, FORM, B/D, SPONSORED?. And then
we would have two tables, one listing the School Fees details and another
listing Pocket Money and Medical Expenses.

Is there anyway of creating a macro or some sort of rule that states: Please
create 460 sheets from the mastercopy containing NAME, FORM, B/D, SPONSORED
and both tables?

Please help!!
Thank you
--
DCT Mvumi School

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
Need macros for copy data into new workbooks Hardeep_kanwar[_2_] Excel Discussion (Misc queries) 2 August 30th 08 04:55 AM
Macros to copy and paste data Migyu Excel Discussion (Misc queries) 1 August 26th 08 01:25 PM
copy data from macros Bridgeton Excel Discussion (Misc queries) 1 July 9th 07 05:34 PM
Pulling data from sheet to mastersheet TooN Excel Discussion (Misc queries) 6 September 5th 06 11:41 AM
Copy data to another column Macros dominoguru2 Excel Worksheet Functions 2 November 2nd 05 08:01 PM


All times are GMT +1. The time now is 03:53 PM.

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"