Excel - Can Database Function Criteria be a Date?

Asked By jr
11-Oct-07 04:57 PM
Can the criteria for a database function be in the form of a Date (e.g.
John.NOSPAMr.voiNOSPAMt
(1)
Workbook
(1)
ISTEXT
(1)
DCOUNT
(1)
TEXT
(1)
DSUM
(1)
Database
(1)
DAE9E10F7994
(1)
  Peo Sjoblom replied...
11-Oct-07 05:04 PM
If you mean greater than 1/1/2007?

=">2007-01-01"

or

=">"&TEXT(DATE(2007,1,1),"yyyy-mm-dd")

or


=">"&DATE(2007,1,1)


or

=">1/1/07"


I would advice against the latter 2, the first of those will display the
serial number of the date and the latter will fail if moved to another
regional setting


--


Regards,


Peo Sjoblom
  jr replied...
11-Oct-07 05:21 PM
Yes I did mean greater than 1/1/2007.  However, It doesn't seem to work.
Here's what I did to check.

I created a simple database with "Date" as the first column and "Check" As
the second column (= to all 1s). I populated dates in the date column in the
syntax mm/dd/yy.  I then established a criteria array with one column two
rows, First row is labeled Date.  In the second row I typed the criteria as
you show below (i.e.  =">2007-01-01").  When I hit enter the cell shows
error.

Any suggestions?
  jr replied...
11-Oct-07 05:29 PM
I fixed the #Value! error.  However, DSUM is returning 0 on check eventhough
there are dates that meet the criteria.
  Peo Sjoblom replied...
11-Oct-07 05:49 PM
What's the formula you are using, it certainly works for me if I create the
same, assuming you want to sum all checks with dates greater than 01/01/07

=DSUM(DataBase,"Check",E1:E2)

or to count the dates

=DCOUNT(DataBase,"Dates",E1:E2)

the D functions don't work if the source workbook is closed if you have the
formula in another workbook


--


Regards,


Peo Sjoblom
  Peo Sjoblom replied...
11-Oct-07 05:52 PM
Try

=ISTEXT(cell)

on both the dates and the check values, if they are imported they may have
trailing/leading spaces



--


Regards,


Peo Sjoblom
  jr replied...
11-Oct-07 06:14 PM
I was using the DSUM formula you show below.  It's just not working for me.
There must be something different. Is there anyway you can send me your
  Peo Sjoblom replied...
12-Oct-07 12:17 AM
Sure, post your email address but do it so no spambots can get a hold of it

so if your email address is

johndoe@yahoo.com

post it like

johndoeNOSPAMatNOSPAMyahoo.com

and I will send you a little sample


--

Regards,

Peo Sjoblom
  jr replied...
12-Oct-07 06:56 AM
Thanks a ton.

john.NOSPAMr.voiNOSPAMt@delNOSPAMphi.com

jrv
  Peo Sjoblom replied...
12-Oct-07 10:13 AM
I just sent you an email with a sample workbook attached


--


Regards,


Peo Sjoblom
Create New Account
help
Pass Workbook Name Into Another Workbook As A Variable Excel Greetings, I open one workbook which opens another workbook using the workbook open event of the first workbook. The first workbook is the active workbook. The first workbook's name is not always the same but it's code is
How to append data from different sheet and different workbook? Excel Hi Guys, Which is the best way using excel VBA to combined non duplicate data from different sheets and different workbook? For example I have 2 workbook, workbook 1 and workbook 2. They have similar worksheet with similar header. Now my mission to copy data from workbook 2 into workbook 1 but for non duplicate data. Meaning if the data in workbook 2 found in workbook 1 then skip else copy this data below. In my mind
use vlookup for this?? Excel Hi everyone, I am trying to bring information from one workbook to another workbook. Workbook 1 has a list of numbers that represent corresponding chemicals we use, beside them Column B is the actual name of the chemical. Workbook 2 has all the information about the chemical without the name. Column A is the number as in workbook 1. What I want to do is bring workbook 2 info across to workbook 1 so that I get the chemical number, chemical name and the corresponding data in one workbook. One possible problem is that while they are sorted by chemical number, some chemicals will