Thread: If Statments
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas, Excel MVP Bob Umlas, Excel MVP is offline
external usenet poster
 
Posts: 320
Default If Statments

Assuming the "line items" dates are in col A and the values are in B:
=SUMPRODUCT(--(A1:A29=DATEVALUE("1/1/2001")),B1:B29)/0.029+SUMPRODUCT(--(A1:A29<DATEVALUE("1/1/2001")),B1:B29)/0.03

"Jason" wrote:

I need to write a formula that sum all the values in an amount field based on
the following criteria:

Line items that have a date greater than or equal to 1/1/2001 need to be
divided by .029.

Line items that have a date less than 1/1/2001 need to be divided by .03.

How would I go about writing this formula? Do I need to use and if statment?