Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmtexman
 
Posts: n/a
Default Searching on Dates


I maintain an Excel spreadsheet that contains inventory information such
as Manufacturer, Model, Cost, Qty, Total Cost, Date Acquired. The K
column contains the dates in the mm/dd/yy format and the G column
contains the quantity of each inventory item.

In order to break this information down by date range, I am using the
following formula:

=SUMIF('Car Inventory'!K2:K431,"<1/1/00",'Car Inventory'!G2:G431),
which works fine for selecting all items prior to Jan 1st, 2000.

However, when I need a the information for the year 2000, I do not want
to include anything prior to 1/1/00 so I am trying to use the following
formulat:

=SUMIF('Car Inventory'!$K$2:K431,AND("=01/01/00","<=12/31/00"),'Car
Inventory'!$G$2:G431)

The one in red does not work. Any suggestions?


--
nmtexman
------------------------------------------------------------------------
nmtexman's Profile: http://www.excelforum.com/member.php...o&userid=35684
View this thread: http://www.excelforum.com/showthread...hreadid=554664

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Franz Verga
 
Posts: n/a
Default Searching on Dates

Nel post
*nmtexman* ha scritto:

I maintain an Excel spreadsheet that contains inventory information
such as Manufacturer, Model, Cost, Qty, Total Cost, Date Acquired.
The K column contains the dates in the mm/dd/yy format and the G
column contains the quantity of each inventory item.

In order to break this information down by date range, I am using the
following formula:

=SUMIF('Car Inventory'!K2:K431,"<1/1/00",'Car Inventory'!G2:G431),
which works fine for selecting all items prior to Jan 1st, 2000.

However, when I need a the information for the year 2000, I do not
want to include anything prior to 1/1/00 so I am trying to use the
following formulat:

=SUMIF('Car Inventory'!$K$2:K431,AND("=01/01/00","<=12/31/00"),'Car
Inventory'!$G$2:G431)



Until Excel 2003 you can use just one condition in SUMIF function. With 2 or
more condition you can use SUMPRODUCT function


=SUMPRODUCT(('Car Inventory'!$K$2:K431=01/01/00)*('Car
Inventory'!$K$2:K431<=12/31/00)*('Car Inventory'!$G$2:G431))

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Searching on Dates

Hi!

Try this:

=SUMPRODUCT(--(YEAR('Car Inventory'!K2:K431)=2000),'Car Inventory'!G2:G431)

Biff

"nmtexman" wrote in
message ...

I maintain an Excel spreadsheet that contains inventory information such
as Manufacturer, Model, Cost, Qty, Total Cost, Date Acquired. The K
column contains the dates in the mm/dd/yy format and the G column
contains the quantity of each inventory item.

In order to break this information down by date range, I am using the
following formula:

=SUMIF('Car Inventory'!K2:K431,"<1/1/00",'Car Inventory'!G2:G431),
which works fine for selecting all items prior to Jan 1st, 2000.

However, when I need a the information for the year 2000, I do not want
to include anything prior to 1/1/00 so I am trying to use the following
formulat:

=SUMIF('Car Inventory'!$K$2:K431,AND("=01/01/00","<=12/31/00"),'Car
Inventory'!$G$2:G431)

The one in red does not work. Any suggestions?


--
nmtexman
------------------------------------------------------------------------
nmtexman's Profile:
http://www.excelforum.com/member.php...o&userid=35684
View this thread: http://www.excelforum.com/showthread...hreadid=554664



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SteveG
 
Posts: n/a
Default Searching on Dates


You could use one of these.

=SUM(IF(YEAR('Car Inventory'!K2:K431)=2000,'Car Inventory'!G2:G431,0))

Which is an array formula so commit with Ctrl-Shift-Enter.

Or if you don't want to use an array formula then:

=SUMPRODUCT((YEAR('Car Inventory'!K2:K431)=2000)*('Car
Inventory'!G2:G431))

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=554664

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Searching on Dates

('Car Inventory'!$K$2:K431=01/01/00)

That will be evaluated as:

'Car Inventory'!$K$2:K431= 1 divided by 1 divided by 0.

Try it like this:

('Car Inventory'!$K$2:K431=--"01/01/00")

Better yet, use the same syntax as the DATE( ) function:

('Car Inventory'!$K$2:K431=--"2000/1/1")

OTOH, that looks kind of cryptic and ugly so maybe just use the DATE( )
function:

('Car Inventory'!$K$2:K431=DATE(2000,1,1))

Biff

"Franz Verga" wrote in message
...
Nel post
*nmtexman* ha scritto:

I maintain an Excel spreadsheet that contains inventory information
such as Manufacturer, Model, Cost, Qty, Total Cost, Date Acquired.
The K column contains the dates in the mm/dd/yy format and the G
column contains the quantity of each inventory item.

In order to break this information down by date range, I am using the
following formula:

=SUMIF('Car Inventory'!K2:K431,"<1/1/00",'Car Inventory'!G2:G431),
which works fine for selecting all items prior to Jan 1st, 2000.

However, when I need a the information for the year 2000, I do not
want to include anything prior to 1/1/00 so I am trying to use the
following formulat:

=SUMIF('Car Inventory'!$K$2:K431,AND("=01/01/00","<=12/31/00"),'Car
Inventory'!$G$2:G431)



Until Excel 2003 you can use just one condition in SUMIF function. With 2
or more condition you can use SUMPRODUCT function


=SUMPRODUCT(('Car Inventory'!$K$2:K431=01/01/00)*('Car
Inventory'!$K$2:K431<=12/31/00)*('Car Inventory'!$G$2:G431))

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmtexman
 
Posts: n/a
Default Searching on Dates


SUMPRODUCT does it for me. Thanks folks.:)


--
nmtexman
------------------------------------------------------------------------
nmtexman's Profile: http://www.excelforum.com/member.php...o&userid=35684
View this thread: http://www.excelforum.com/showthread...hreadid=554664

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates and Intervals Dave_Lee Excel Worksheet Functions 8 May 26th 06 01:34 PM
formula to add dates. S S Excel Worksheet Functions 8 April 5th 06 07:53 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
US dates to UK?? Bill Excel Worksheet Functions 4 December 8th 05 06:44 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"