+ Reply to Thread
Results 1 to 2 of 2

DATABASE FORMULA

  1. #1
    becky
    Guest

    DATABASE FORMULA

    I have a formula that I created in a worksheet that reads thus

    =DSUM(DB,3,JAN)

    The database is a range of cells from A6 to G36, the 3 represents the third
    column in the database (or the field) and the JAN is the Criteria on another
    sheet. These cells are C3 which equals the word DATE and C4 which has the
    following formula

    =AND('Expense 1'!A7>=Criteria!$A$4, 'Expense 1'!A7<=Criteria!$B$4)

    Everytime I try to Copy the Sheet Expenses 1 the formula does not work. I
    get all zeros where the =DSUM formula should be calculating.

    Does anyone know how I can get these formulas to work when I Copy the Sheet
    and create a new one? I need 25 Sheets that will all do the same math.

    Thanks
    --
    bb

  2. #2
    Debra Dalgleish
    Guest

    Re: DATABASE FORMULA

    Instead of using a workbook level range name (DB), you could use a sheet
    level name:

    Select the cells that you want to name
    Choose Insert>Name>Define
    In the Name box, type the sheet name, exclamation mark, and range name.
    For example: 'Expense 1'!DB
    Click Add, click Close

    However, your JAN criteria range refers to the values on the Expense 1
    sheet, so it won't work correctly for other sheets. On the Expense 2
    sheet, you could use a DSUM formula:

    =DSUM('Expense 2'!DB,3,FEB)

    and in the criteria range use the formula:

    =AND('Expense 2'!A7>=Criteria!$A$4, 'Expense 2'!A7<=Criteria!$B$4)

    Or, instead of a DSUM formula, use SUMPRODUCT:

    =SUMPRODUCT(--(A7:A36>=Criteria!A4),
    --('Expense 1'!A7:A36<=Criteria!B4), --('Expense 1'!C7:C36))

    becky wrote:
    > I have a formula that I created in a worksheet that reads thus
    >
    > =DSUM(DB,3,JAN)
    >
    > The database is a range of cells from A6 to G36, the 3 represents the third
    > column in the database (or the field) and the JAN is the Criteria on another
    > sheet. These cells are C3 which equals the word DATE and C4 which has the
    > following formula
    >
    > =AND('Expense 1'!A7>=Criteria!$A$4, 'Expense 1'!A7<=Criteria!$B$4)
    >
    > Everytime I try to Copy the Sheet Expenses 1 the formula does not work. I
    > get all zeros where the =DSUM formula should be calculating.
    >
    > Does anyone know how I can get these formulas to work when I Copy the Sheet
    > and create a new one? I need 25 Sheets that will all do the same math.
    >
    > Thanks



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1