View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
maryj maryj is offline
external usenet poster
 
Posts: 76
Default Pivot table grouping excluding weekends

All of the dates in the raw data are weekdays - no weekend dates. However,
when grouping, you have to select the number of days to group by. For
example, the group by is set to every 3 days. It creates a group for Sept
4-6, then the next group would be Sept 7-9 - the 9th is a Saturday and there
is actually no data for Saturday but the grouping just uses the calendar
days, it doesn't look to see if there is data for a date or not. We don't
think there really is any way around this but just wondering if we missed
anything.
--
maryj


"Roger Govier" wrote:

Hi Mary

I'm sorry, I meant to make the base of 1 = Monday for Weekday.
Change the formula to
=IF(WEEKDAY(A2,2)<6,"Y","")


--
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Mary

Add an extra column to your source data, titled Weekday
In this column enter
=IF(WEEKDAY(A2)<6,"Y","")
Change A2 to the column containing your dates and copy down

Extend the data range in your PT to include this extra column.
Drag the Weekday field to the Page area and from the dropdown Select Y

--
Regards

Roger Govier


"maryj" wrote in message
...
The data has a field called "Date". In the pivot table, the grouping
is set
to display the dates in 3 day groups. Is there any way to do this
type of
grouping but only use the weekdays and exclude the weekends?
--
maryj