PC Review


Reply
Thread Tools Rate Thread

Differentiating data by year into columns

 
 
Toon
Guest
Posts: n/a
 
      22nd Feb 2006

I currently have 3 columns in my spreadsheet, that pulls information
from a data dump I get from a database. The 3 columns are based on
years (2006, 2005, 2004). I have them setup as

2004 2005 2006
=Now()-730 =Now()-365 =Now()

so that they dynamically change when the year changes. Below them the
rows contain the information I want displayed by year. However, the
date column in the data dump I get gives dates formatted like this:
2005-09
I have a dsum that looks at a different column, and sums based on
country, but in order to make sure that the values appear based on the
year in the date column, how would I set that up? I obviously need to
be able to look at only the first 4 characters in the date fields
values, but how? Plus, it needs to look at the year in the column
header, and only give the values related to that year from the date
column in the data dump.

Any and all help is greatly appreciated!


--
Toon
------------------------------------------------------------------------
Toon's Profile: http://www.excelforum.com/member.php...o&userid=31337
View this thread: http://www.excelforum.com/showthread...hreadid=515421

 
Reply With Quote
 
 
 
 
SteveG
Guest
Posts: n/a
 
      22nd Feb 2006

Would SUMPRODUCT work for you?

Try,

=SUMPRODUCT((YEAR(Sheet2!A2:A6)=YEAR(A1))*(Sheet2!B2:B6="USA")*(Sheet2!C2:C6))

Sheet2! is your data dump. A:A is Date, B:B is Country and C:C are the
values to sum. A1 is where your NOW()-730 is located. You can refer to
a cell that contains the country name rather than typing in the
country.

Just an FYI, if your data dump has headers like "Date" in the first
row, your SUMPRODUCT range should start on the second row. That is
because the YEAR function of text like Date will return a VALUE error.

Does that help?

Steve


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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Last YTD average in columns with full year of data. Joe Microsoft Excel Worksheet Functions 6 19th Dec 2008 07:18 AM
Year to Year Sales Data Sort cltyank Microsoft Excel Programming 2 26th Nov 2004 05:56 AM
Comparing current year and prior year data in one report =?Utf-8?B?c3doaXRl?= Microsoft Access Reports 5 24th Feb 2004 03:52 AM
Grouping data by fiscal year not calendar year Ted Hall Microsoft Access 1 26th Nov 2003 11:36 AM
Re: Differentiating Text from Hyperlink Data type Tom Ogilvy Microsoft Excel Programming 0 17th Nov 2003 06:31 PM


Features
 

Advertising
 

Newsgroups
 


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