Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Creating a Pivot Table with VBA

Hello All,

I've been trying to get this Pivot table to work but the formatting escapes
me. All the examples I see have seperate sheets listing duplicate entries in
a long list of items. I'm hoping to use a different approach. What I'd like
to see is a calendar with some drop-downs that a user could select to show
them the available times for say tutors with experience in CISC 310 - C
Programming etc... Or if the user selects a particular tutor show them the
available hours for that particular tutor etc... I know the only way to get
those drop-downs is a pivot table but they don't work with the setup I have.
Just point in the right direction please....

Here's the link on Google where the spread sheet is
http://spreadsheets.google.com/pub?k...M0Q8cDLP8XPBEw

The sheets I'm wanting to use a
1. Lab Schedule - This is where I'd like the pivot table info to be with a
listing of each tutors name in the time slot. I'd like drop-downs boxes for
class, tutor name and subject. Each would limit the data displayed in the
schedule.
2. Tutor Subject List - Has a sheet with a listing of subjects the tutor is
capable in.
3. Tutor Class List - Similar to above only with classes
4. Tutor Schedule - A Sheet with the available times for the tutor

I've got several named ranges set up and I've created a couple of VB macros
to create lists of the data in those ranges from the sheets.

Examples...

' Gives me a list like John Doe Class1 etc...
Sub ShowTutorClassList()
For Each c In Range("TutorClassX")
If c.Value = "x" Or c.Value = "X" Then
Debug.Print ActiveSheet.Cells(c.Row, 1).Value & " " &
ActiveSheet.Cells(1, c.Column).Value
End If
Next c
End Sub

' Gives me a list like John Doe Subject1
Sub ShowTutorSubjectList()
For Each c In Range("TutorSubjectX")
If c.Value = "x" Or c.Value = "X" Then
Debug.Print ActiveSheet.Cells(c.Row, 1).Value & " " &
ActiveSheet.Cells(1, c.Column).Value
End If
Next c
End Sub

'Gives me a list like John Doe Monday 9:00am-9:30am
Sub ShowTutorScheduleList()
Dim vchName As String
For Each c In Range("TutorScheduleX")
If ((c.Column Mod 2 = 0) And (ActiveSheet.Cells(1, c.Column).Value
< "")) Then
vchName = ActiveSheet.Cells(1, c.Column).Value
End If
If c.Value = "x" Or c.Value = "X" Then
Debug.Print vchName & " " & ActiveSheet.Cells(2, c.Column).Value
& " " & ActiveSheet.Cells(c.Row, 1).Value; ""
End If
Next c
End Sub

Now I just need to figure out the Pivot table code...

Thanks in advance for any guidance...

John


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
How can I detail Pivot Table data without creating a table (Excel2007) Skeletiko[_2_] Excel Discussion (Misc queries) 1 May 5th 10 08:22 AM
How can I detail Pivot Table data without creating a table (Excel2007) Skeletiko Excel Discussion (Misc queries) 0 May 5th 10 12:21 AM
creating a report from a table, pivot table not suitable UKMAN Excel Worksheet Functions 1 April 16th 10 08:35 AM
creating a pivot table from 4 pivot tables phyllis W Excel Worksheet Functions 0 October 12th 08 09:52 PM
VBA creating Pivot Table No Name Excel Programming 0 February 5th 04 01:10 AM


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