A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DSUM to pull data from Access DB



 
 
Thread Tools Display Modes
  #1  
Old May 12th, 2009, 03:09 PM posted to microsoft.public.excel.worksheet.functions
Brian[_16_]
external usenet poster
 
Posts: 34
Default DSUM to pull data from Access DB

Howdy All,

I'm trying to sum data contained in an Access DB based on multiple criteria.

DB name = FTD.mdb
location = c:\FTD.mdb

I'm trying to sum Labor hours (which are in a column labels 'Labor) for a
specific 'Manager' (column name) and specific 'Assignee' (column name).

Criteria entered in A1:B2
A B
1 Manager Assignee
2 Flintsone, Fred Rubble, Barney

Formula I have tried =DSUM("C:\FTD.mdb","Labor",A1:B2)

I'm getting the generic "The formula you typed contains an error." and it
highlights my criteria range.

Have I overlooked something simple (which I usually do)?

Thanks,
Brian


  #2  
Old May 12th, 2009, 05:39 PM posted to microsoft.public.excel.worksheet.functions
ProfessionalExcel.com
external usenet poster
 
Posts: 6
Default DSUM to pull data from Access DB

Brian,

I hate to spoil your interpretation of the DSUM function, but the 'Database'
parameter doesn't refer to a separate Database file, it's a range of cells.
Please see below for the Excel Help description of the function:

DSUM(database,field,criteria)

'Database' is the range of cells that makes up the list or database. A
database is a list of related data in which rows of related information are
records, and columns of data are fields. The first row of the list contains
labels for each column.

'Field' indicates which column is used in the function. Enter the column
label enclosed between double quotation marks, such as "Age" or "Yield," or a
number (without quotation marks) that represents the position of the column
within the list: 1 for the first column, 2 for the second column, and so on.

'Criteria' is the range of cells that contains the conditions that you
specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column
label in which you specify a condition for the column.



In terms of solving your objective of getting data into Excel from Access;
If you want to automate it, you'll have to go down the VBA route; If you're
not worried about automation, then use Excel's wizard to import data from an
external source. The following article may be of use to you in terms of using
VBA: http://www.zmey.1977.ru/Access_To_Excel.htm


----------------------------
Please rate this post if it answers your question.

Thanks,

Chris
http://www.ProfessionalExcel.com


"Brian" wrote:

Howdy All,

I'm trying to sum data contained in an Access DB based on multiple criteria.

DB name = FTD.mdb
location = c:\FTD.mdb

I'm trying to sum Labor hours (which are in a column labels 'Labor) for a
specific 'Manager' (column name) and specific 'Assignee' (column name).

Criteria entered in A1:B2
A B
1 Manager Assignee
2 Flintsone, Fred Rubble, Barney

Formula I have tried =DSUM("C:\FTD.mdb","Labor",A1:B2)

I'm getting the generic "The formula you typed contains an error." and it
highlights my criteria range.

Have I overlooked something simple (which I usually do)?

Thanks,
Brian



  #3  
Old May 12th, 2009, 11:21 PM posted to microsoft.public.excel.worksheet.functions
Brian[_16_]
external usenet poster
 
Posts: 34
Default DSUM to pull data from Access DB

Thanks Chris, you are correct, my interpretation of 'database' was that it
could be a database.

I would love to automate the process, so I will look at the article you
linked to.

Thanks a million!
Brian

"ProfessionalExcel.com"
wrote in message ...
Brian,

I hate to spoil your interpretation of the DSUM function, but the
'Database'
parameter doesn't refer to a separate Database file, it's a range of
cells.
Please see below for the Excel Help description of the function:

DSUM(database,field,criteria)

'Database' is the range of cells that makes up the list or database. A
database is a list of related data in which rows of related information
are
records, and columns of data are fields. The first row of the list
contains
labels for each column.

'Field' indicates which column is used in the function. Enter the column
label enclosed between double quotation marks, such as "Age" or "Yield,"
or a
number (without quotation marks) that represents the position of the
column
within the list: 1 for the first column, 2 for the second column, and so
on.

'Criteria' is the range of cells that contains the conditions that you
specify. You can use any range for the criteria argument, as long as it
includes at least one column label and at least one cell below the column
label in which you specify a condition for the column.



In terms of solving your objective of getting data into Excel from Access;
If you want to automate it, you'll have to go down the VBA route; If
you're
not worried about automation, then use Excel's wizard to import data from
an
external source. The following article may be of use to you in terms of
using
VBA: http://www.zmey.1977.ru/Access_To_Excel.htm


----------------------------
Please rate this post if it answers your question.

Thanks,

Chris
http://www.ProfessionalExcel.com


"Brian" wrote:

Howdy All,

I'm trying to sum data contained in an Access DB based on multiple
criteria.

DB name = FTD.mdb
location = c:\FTD.mdb

I'm trying to sum Labor hours (which are in a column labels 'Labor) for a
specific 'Manager' (column name) and specific 'Assignee' (column name).

Criteria entered in A1:B2
A B
1 Manager Assignee
2 Flintsone, Fred Rubble, Barney

Formula I have tried =DSUM("C:\FTD.mdb","Labor",A1:B2)

I'm getting the generic "The formula you typed contains an error." and it
highlights my criteria range.

Have I overlooked something simple (which I usually do)?

Thanks,
Brian





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.