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
 
Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs])
 
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
 

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

Similar Threads

Sum If 7
DateDif - End of Month 1
SUMIF between 2 dates 1
Totals by Year 3
Excel To Access 1
Sum If 2
Calculating totals on a Crosstab Query 34
Group by year, then by total 1

Back
Top