I am new to VBA and am stuck

I am new to VBA and am stuck

Post by djsmithuk1 » Sat, 13 Dec 2003 21:01:12

I am really stuck, plz help me

on my first sheet I have headers called, meeting, time, date, winner.

i have a vba user sheet to input data on the next available line.

this is where I am stuck,

I now need the data enterd to be sorted in the relevant sheets.
for example under the header meeting, i may have 1, 2, 3, 4, 5

what i need is for this data to be sent to other sheets automatically
depending on what meeting it was.

I also need the remaining data (time, date) to be shown on the
relevant sheet,


sheet 2

should show
meeting time date
1 9:15 20/12/03
1 10:00 20/12/03

should show
meeting time date
2 9:20 19/05/03
2 10:45 21/05/03
2 3:15 21/05/03

and so on and so on.

I also need this data to be sorted in order as shown above.
but sheet 1 may not be in sorted order,

is this posable??

if so I would be very gratefull if someone could tell me how to do

many thanx

Message posted from http://www.yqcomputer.com/

I am new to VBA and am stuck

Post by Tom Ogilv » Sat, 13 Dec 2003 21:40:46

You can use the advanced filter to copy date meeting specified criteria from
one sheet to another sheet. Turn on the macro recorder, then apply and
advanced filter to you data, use the copy option rather the filter in place
option. It is easiest to have the destination be on the same sheet,
otherwise, you have to start the filtering process from the destination
sheet. Anyway, once you have gotten a copy of the data for one of the
meetings, turn off the macro recorder. As far as the advanced filter part,
you should have recorded a single command. You can now alter this command
to put data on another sheet and to reference a separate criteria range on
each of the destination sheets that will get the appropriate data. If you
want a subset of the columns, this is supported as well. You can then
record sorting the data on one of the sheets and modify that code also.

Tom Ogilvy


I am new to VBA and am stuck

Post by snoopy36 » Sat, 13 Dec 2003 23:13:01

Sounds like you're trying to do something similar to what I'm doing ...
if you're reading this on excelforum.com, browse down to my thread --
I'm creating new worksheets dynamically based on a list of names (or in
this case you're using a list of numbers, but it should be similar).
This is necessary if you don't know how many meetings there are ahead
of time, and want the worksheet to create them dynamically.

If you want the original tip that I used to help create that, do a
google search on "excel new worksheet" and there should be an
exceltip.com link there. :)


Message posted from http://www.yqcomputer.com/