SumIf Help

K

Karin

Hi, I want to do something like this:

If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs].

I want to do this in a report group footer.

TIA
 
D

Duane Hookom

Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs])
 
K

Karin

Duane,

Thank you. After several hours, this is what I came up with. I don't
really understand why I need to use the Abs reference. I thought Abs was
just to get a positive number (even if the answer was a negative).

=Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs]))


Duane Hookom said:
Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs])

--
Duane Hookom
Microsoft Access MVP


Karin said:
Hi, I want to do something like this:

If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs].

I want to do this in a report group footer.

TIA
 
K

Karin

I forgot to mention that your response works great and its a little cleaner.

Karin said:
Duane,

Thank you. After several hours, this is what I came up with. I don't
really understand why I need to use the Abs reference. I thought Abs was
just to get a positive number (even if the answer was a negative).

=Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs]))


Duane Hookom said:
Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs])

--
Duane Hookom
Microsoft Access MVP


Karin said:
Hi, I want to do something like this:

If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs].

I want to do this in a report group footer.

TIA
 
D

Duane Hookom

Why I use Abs():
This expression will return either 0 (False) or -1 (True).
([ProjectFYE] Between #01/01/2006# And #12/31/2006#)
Abs() will convert the -1 to 1.

--
Duane Hookom
Microsoft Access MVP


Karin said:
I forgot to mention that your response works great and its a little cleaner.

Karin said:
Duane,

Thank you. After several hours, this is what I came up with. I don't
really understand why I need to use the Abs reference. I thought Abs was
just to get a positive number (even if the answer was a negative).

=Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs]))


Duane Hookom said:
Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs])

--
Duane Hookom
Microsoft Access MVP


:

Hi, I want to do something like this:

If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs].

I want to do this in a report group footer.

TIA
 
K

Karin

The "Ah ha" moment. Thank you! :)

Duane Hookom said:
Why I use Abs():
This expression will return either 0 (False) or -1 (True).
([ProjectFYE] Between #01/01/2006# And #12/31/2006#)
Abs() will convert the -1 to 1.

--
Duane Hookom
Microsoft Access MVP


Karin said:
I forgot to mention that your response works great and its a little cleaner.

Karin said:
Duane,

Thank you. After several hours, this is what I came up with. I don't
really understand why I need to use the Abs reference. I thought Abs was
just to get a positive number (even if the answer was a negative).

=Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs]))


:

Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs])

--
Duane Hookom
Microsoft Access MVP


:

Hi, I want to do something like this:

If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs].

I want to do this in a report group footer.

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top