Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dmorri254
 
Posts: n/a
Default Counting Data From A Query

Hello,
Here is am example of data pulled from a query into excel. What I need to do
is create a many to one relationship after the data is pulled:
Date Num Incident Completion Date
12/16/2004 326 39413 1/13/2005
12/16/2004 326 38314 1/13/2005
12/16/2004 326 35602 1/13/2005

So all the incidents related to num 326 should display as a count of how
many there are (3), the date shuld just display 12/16/2004 and there should
only be one completion date 1/13/2005...ca this be done without creating
another sheet to massage the data? Can it be done when it is pulled?

Thanx



  #2   Report Post  
Rob van Gelder
 
Posts: n/a
Default

Could your query would return the data in the format desired?
eg. select date, num, count(incident), competion_date from incident_table
where num = 326 group by date, num, completion_date

Alternatively, I suggest a pivottable.

Highlight your range, eg. A1:D4
From the Data menu, select PivotTable
Click Next through the options until the button for Layout appears - click
it.
Drag all of the fields into Row except Incident which goes into Data
It will probably say Sum of Incident. Doubleclick it and change to Count of
Incident.

You can play with the PivotTable options to remove SubTotals etc..

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Dmorri254" wrote in message
...
Hello,
Here is am example of data pulled from a query into excel. What I need to
do
is create a many to one relationship after the data is pulled:
Date Num Incident Completion Date
12/16/2004 326 39413 1/13/2005
12/16/2004 326 38314 1/13/2005
12/16/2004 326 35602 1/13/2005

So all the incidents related to num 326 should display as a count of how
many there are (3), the date shuld just display 12/16/2004 and there
should
only be one completion date 1/13/2005...ca this be done without creating
another sheet to massage the data? Can it be done when it is pulled?

Thanx





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
Counting Rainfall Data TightIsobars Excel Discussion (Misc queries) 2 January 17th 05 11:45 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Using Microsoft Query data in a pivot table. slapana Charts and Charting in Excel 0 January 11th 05 05:03 PM
Query of External Data Excel GuRu Excel Discussion (Misc queries) 2 January 3rd 05 07:43 PM
Pivot Tables referring to external data query Excel GuRu Excel Discussion (Misc queries) 4 December 29th 04 06:29 PM


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