There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
black screen blue screen boot bsod computer connection crash css dell display driver drivers email error explorer firefox firefox 3 hard drive internet internet explorer itunes laptop lcd malware monitor network networking nvidia outlook outlook 2003 outlook express password printer problem problems ram router security slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Excel 2003 - Selecting data within a date range


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 05:12 AM #1
Solved: Excel 2003 - Selecting data within a date range
Hi, I'm a beginner when it comes to formula for selecting date ranges! I have tried =SUMIF combos but and hitting a wall. Any help would be very welcome. Pretty basic the request.

2 colums, 'A' with the year (currently as plain number) 'B' with a simple number. There are roughtly 5/8 entries for each year, from 1989 to 2008. I need to sum 'b' for a range of years, (say 1990 to 1995), I can do it for one year value but not more.

Just tired this =SUM(IF(D,">1995",E:E)(D,"<1990",E:E)) but did not work.

[I do have a slightly more complicated request of using real dates and being able on select all for the last 15 years for example and 15 to 20 years, but I think we should leave that for another day}

Any help very welcome, thanks.
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 05:26 AM #2
Hi and wellcome to TSG forum!
Try use this:
Code:
=SUMPRODUCT(((A7:A18)>=A6)*((A7:A18)<=B6)*(B7:B18))
where: A7:A18 - contains years, B7:B18 - contains the data to sum, A6 is the star year of the period, and B6 is the end year of the period .
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,566 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
09-Jul-2008, 05:33 AM #3
AJ, brilliant

Of course I would use Access
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 05:36 AM #4
There's another way to do this, Using Autofilter, and Subtotal function, I use them a lot!
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 05:36 AM #5
Many thanks!
That did the tick! Many thanks for your time... (Better than the rubbish book I brought!)

Regards, JB
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 05:37 AM #6
You are wellcome!
Now you can mark the thread as solved, if it's all of course
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 05:39 AM #7
I had the auto filters on but I want to produce 3 or 4 different date ranges, then graph the data and be able to add in new rows.

I will look to access but I'm in a new job and getting things up and running, you would not believe how it was being done, a different sheet for each year range, ouch!
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 05:39 AM #8
will do
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 05:48 AM #9
Not sure if your still there but I tried to use pivot tables to do this, and it seemed a total pain. Are they any good? (For this sort of sorting of data)? thanks
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 05:51 AM #10
Quote:
Originally Posted by Highland Learner View Post
Not sure if your still there but I tried to use pivot tables to do this, and it seemed a total pain. Are they any good? (For this sort of sorting of data)? thanks
Pivot tables are very fine, but they wont let you use the periods (for example 1990-1995), but will do it for every year in the list!
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 05:55 AM #11
ah thanks, that's no good for me! great so at least I can tell the boss they don't work for this specifc issue.

Sorry there was one more, I need a counter of exactly the same as before, so just need a cell to say '18' if there are 18 rows within 1990 and 1995.
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 06:01 AM #12
Quote:
Originally Posted by Highland Learner View Post
ah thanks, that's no good for me! great so at least I can tell the boss they don't work for this specifc issue.
If you wanna you can add one more column in which you'll have the years grouped by periods, and after that use pivot table

Quote:
Originally Posted by Highland Learner View Post
Sorry there was one more, I need a counter of exactly the same as before, so just need a cell to say '18' if there are 18 rows within 1990 and 1995.
U can use this formula:
Code:
=SUMPRODUCT(((A7:A18)>=A6)*((A7:A18)<=B6))
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
09-Jul-2008, 06:03 AM #13
thanks AJ
Aj_old's Avatar
Computer Specs
Senior Member with 624 posts.
 
Join Date: Sep 2007
Location: Moldova
Experience: Intermediate
09-Jul-2008, 06:05 AM #14
You are wellcome,
Highland Learner's Avatar
Computer Specs
Junior Member with 13 posts.
 
Join Date: Jul 2008
Location: London
Experience: Beginner
11-Jul-2008, 05:58 AM #15
Further logic probem.
Hi,

OK I thought this was going to work fine but there is a logic problem I've come across.

I have a list of 160 rows with the year being the key data field and selecting various ranges say 1995 to 2006.

I need to capture the data in a way that I need to keep historic info for years gone (2006,2007) but then alter the sheet (remove a row if no longer relevant) for current and future years.

I was thinking of having a final column with a "year removed field" and the main formula above being dependant on that for inclusion, make sense?

Many thanks
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 08:25 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.