IF AND DATABASE FUNCTIONS

  • Thread starter Thread starter S
  • Start date Start date
S

S

I'm trying to use an if statement together with a
database function.

=IF(('Pivot 022'!I$1:I$454="U1"),DCOUNTA('022-042 (042
from 5-19-04) rosters - class, post, Bus or Non-Bus, F or
T.xls'!INPUT_022,COLUMNS('Pivot 022'!
F$1:H$454),BUS_MAJORS),"")

The formula is correct, but even though I have "U1" 's in
that column, I'm not getting the count of U1s back, just
a blank. Is my formula correct? Thanks so much.
 
I was able to answer my own question from info I found
elsewhere.

This formula did what I wanted to do:

=IF(COUNTIF('Pivot 022'!I$1:I$454,"U1")>0,DCOUNTA('022-
042 (042 from 5-19-04) rosters - class, post, Bus or Non-
Bus, F or T.xls'!INPUT_022,COLUMNS('Pivot 022'!
F$1:H$454),BUS_MAJORS),"")
 
Hi
not really sure what you're trying to do but the first part:
'Pivot 022'!I$1:I$454="U1"
won't work as you compare a range to a value.

Please describe what you're tring to do and a different formula will
work :-)
 
Thanks Frank. I now realize that the answer to my
question is to do a DCOUNTA with multiple criteria - what
I posted before was wrong, as you state. By the way, one
of your old comments about concatenating really helped me
out once when I was in a jam. Thanks a lot -
 
Back
Top