View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Excel Formulas - slowly going mad!!

On Sun, 6 Jul 2008 02:23:01 -0700, John wrote:

Hi,

Please help as I am slowly going mad - I know there must be a simple
solution to the problem but I have lost the plot trying to find it!

I have a simple sheet with 2 defined columns - Cost(A:A:) & Date (B:B:).

I am trying to produce a simple formula that will total the costs from when
given a date range.

I have named cells "from" & "to" for the date criteria to entered and have
used the SUMIF to try to calculate as required.

=SUMIF(Date,"<=FromTo",Cost) - This does not work!

If I change the formula as follows then it will return the correct values

=SUMIF(Date,"<=01/03/20008",Cost)

but I cannot get it to accept the defined names for the criteria, nor to
calculate using 2 criteria.

Any help would be greatly appreciated, as I am actually quite fond of my
laptop and don't really want to throw it across the room!!


=SUMIF(Date,"=" & From,Cost) - SUMIF(Date,"" & To, Cost)

will total costs that are in the range of "From" to "To" inclusive
--ron