SumIf Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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
 
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
 
Back
Top