Connecting Tech Pros Worldwide Forums | Help | Site Map

Transfer Data to an Excel Spreadsheet

Newbie
 
Join Date: May 2007
Posts: 2
#1: May 25 '07
I have a problem which needs a sloution, I have a database of a phone bill which contains all calls made from 100 different branches, this is split down to if the call was local "L", national "N" and local rate "LR", obviously each branch makes a number of each type of call. In total there is nearlly 60,000 calls.
What I need to do is seperate all the branches, then count how many local calls each of them made, then output this to a spreadsheet.
The output I envisage would look like this (in the spreadsheet)

BRANCH | NUMBER OF CALLS |
001
002
.
.
.
etc

the branch number is pre-defined, so both these fields are contained within the data.

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,729
#2: May 25 '07

re: Transfer Data to an Excel Spreadsheet


This question was posted in the Access Articles section by mistake.
I have moved it into the Access Forum section instead.

MODERATOR.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,729
#3: May 25 '07

re: Transfer Data to an Excel Spreadsheet


Please include the MetaData for your table. Here is an example of how to post table MetaData :
Table Name=tblStudent
Expand|Select|Wrap|Line Numbers
  1. Field; Type; IndexInfo
  2. StudentID; AutoNumber; PK
  3. Family; String; FK
  4. Name; String
  5. University; String; FK
  6. Mark; Numeric
  7. LastAttendance; Date/Time
This will make it easier to provide the help you require.
Newbie
 
Join Date: May 2007
Posts: 2
#4: May 29 '07

re: Transfer Data to an Excel Spreadsheet


Sorry I was a little vague, here is further information about the problem.

Table Name = TblCallRecords
the fields I need to take out of the table above are:
Expand|Select|Wrap|Line Numbers
  1. ChargeGroup; String
  2. Date; Date/Time
  3. DistBand; String
ChargeGroup is individual branches approx 100
Date is the date of the call
DistBand is either "L", "LR", "N", "fm1", "fm2", "fm3", "fm4" - this is the main field as I need all the "L"s count how many per day per branch, so if ChargeGroup = Edinburgh count all the "L"s made per day, then output these results into Access as a new table, which in turn can be exported to Excel.
I would like to do this via VB in Access, by just clicking a button.
Cheers
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,729
#5: May 29 '07

re: Transfer Data to an Excel Spreadsheet


You can start with a query as below. No-one's going to do your whole project for you, but we may be able to help you along the way if you make the effort to try yourself first. That way, we can fill in the gaps.
Expand|Select|Wrap|Line Numbers
  1. SELECT [ChargeGroup],[Date],Count([DistBand]) As Calls
  2. FROM [TblCallRecords]
  3. GROUP BY [ChargeGroup],[Date]
Reply