
Signature
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html
Thanks Debra
I did think of a pivot table but it doesn't really solve my issue as it
needs to be updated each time the data changes. What I am trying to achieve
is something that automatically updates the summary when the data changes.
The idea is to minimise user interaction so that all they have to do is
either enter date climbed, click a button to sort data by 2 or 3
predetermined criteria or click a link that takes them to a map of the hills
they want to climb.
cheers
James
> You could create a pivot table from the data, with Area in the row area,
> and Count of Date climbed in the data area.
[quoted text clipped - 100 lines]
> >
> > Lake District (G/LD) 8 2 6
Dave Peterson - 03 Oct 2004 12:33 GMT
Debra has some instructions on how to use dynamic ranges that will adjust size
when you add/delete rows at:
http://www.contextures.com/xlNames01.html#Dynamic
And you could use an worksheet_activate event to update the pivottable when you
activate the sheet that holds the pivottable. (I'm guessing that the data is on
a separate worksheet.)
Option Explicit
Private Sub Worksheet_Activate()
Dim myPT As PivotTable
For Each myPT In Me.PivotTables
myPT.RefreshTable
Next myPT
End Sub
Just rightclick on the worksheet tab that holds the pivottable. Select view
code and paste this into the code window.
Then select your worksheet with your data, make a change (remember what it is so
you can change it back), then select your pivottable worksheet.
> Thanks Debra
>
[quoted text clipped - 131 lines]
> > Excel FAQ, Tips & Book List
> > http://www.contextures.com/tiptech.html

Signature
Dave Peterson
ec35720@msn.com
Debra Dalgleish - 03 Oct 2004 12:55 GMT
You could use the Sumproduct function to get the total--
In your summary table include a separate column with area codes. This
example is in cells A2:E5
Area Code Hills Climbed Remaining
Central England G/CE
Devon and Cornwall G/DC
Lake District G/LD
In the hills column, you can modify your existing Countif formula to
refer to the area code column, e.g.:
=COUNTIF(N21:N198,B2)
In the climbed column, use a sumproduct formula:
=SUMPRODUCT(($N$21:$N$198=B2)*($O$21:$O$198<>""))
where date climbed is in column O.
> Thanks Debra
>
[quoted text clipped - 146 lines]
>>>
>>>Lake District (G/LD) 8 2 6

Signature
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html
James - 04 Oct 2004 23:14 GMT
Thanks Debra
That works exactly the way I want.
I just love Excel. Every time I write a new spreadsheet I get to learn a
new function :o).
Regards
James
> You could use the Sumproduct function to get the total--
>
[quoted text clipped - 167 lines]
> >>>
> >>>Lake District (G/LD) 8 2 6
Debra Dalgleish - 04 Oct 2004 23:45 GMT
You're welcome! Thanks for letting me know that it worked.
> Thanks Debra
>
[quoted text clipped - 192 lines]
>>>>>
>>>>>Lake District (G/LD) 8 2 6

Signature
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html