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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|