Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kat Kat is offline
external usenet poster
 
Posts: 56
Default problem with the formula?

I am sorting a set of data by date and range:

2006 1473
2006 854
2007 1577
2007 923
2008 2548
2008 1209
2009 1009
2009 2183

I am sorting by <1000, 1000 <1500, 1500 <2000, 2000 and I was able to use
=SUMPRODUCT(--(D34:D65536=2009)*(G34:G65536=1)) to get the results I was
looking for and it worked for 2007, 2008, 2009. I put in some test data to
check and make sure it would continue working when we hit 2010, but for some
reason it will not work. Is there a better formula I should be using? What
did I do?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default problem with the formula?

What your formula does is count how many rows are there where col D is having
the number 2009 (not a date) and col G having the number 1
=SUMPRODUCT((D34:D65536=2009)*(G34:G65536=1))

As mentioned in your query if you have date in col D the below will give you
the count of dates which are in the year 2010 and col g with a value of 1.
=SUMPRODUCT((TEXT(D34:D65536,"yyyy")="2010")*(G34: G65536=1))

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I am sorting a set of data by date and range:

2006 1473
2006 854
2007 1577
2007 923
2008 2548
2008 1209
2009 1009
2009 2183

I am sorting by <1000, 1000 <1500, 1500 <2000, 2000 and I was able to use
=SUMPRODUCT(--(D34:D65536=2009)*(G34:G65536=1)) to get the results I was
looking for and it worked for 2007, 2008, 2009. I put in some test data to
check and make sure it would continue working when we hit 2010, but for some
reason it will not work. Is there a better formula I should be using? What
did I do?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kat Kat is offline
external usenet poster
 
Posts: 56
Default problem with the formula?

I figured out the range, but when I try using the formula for simpler things
I keep getting a value of zero...

2006 1
2006 4
2006 5
2006 1

"Jacob Skaria" wrote:

What your formula does is count how many rows are there where col D is having
the number 2009 (not a date) and col G having the number 1
=SUMPRODUCT((D34:D65536=2009)*(G34:G65536=1))

As mentioned in your query if you have date in col D the below will give you
the count of dates which are in the year 2010 and col g with a value of 1.
=SUMPRODUCT((TEXT(D34:D65536,"yyyy")="2010")*(G34: G65536=1))

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I am sorting a set of data by date and range:

2006 1473
2006 854
2007 1577
2007 923
2008 2548
2008 1209
2009 1009
2009 2183

I am sorting by <1000, 1000 <1500, 1500 <2000, 2000 and I was able to use
=SUMPRODUCT(--(D34:D65536=2009)*(G34:G65536=1)) to get the results I was
looking for and it worked for 2007, 2008, 2009. I put in some test data to
check and make sure it would continue working when we hit 2010, but for some
reason it will not work. Is there a better formula I should be using? What
did I do?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default problem with the formula?

Please post a sample data (10 to 15 rows) and the formula you tried (which
gives a mismatch). We can work that out.

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I figured out the range, but when I try using the formula for simpler things
I keep getting a value of zero...

2006 1
2006 4
2006 5
2006 1

"Jacob Skaria" wrote:

What your formula does is count how many rows are there where col D is having
the number 2009 (not a date) and col G having the number 1
=SUMPRODUCT((D34:D65536=2009)*(G34:G65536=1))

As mentioned in your query if you have date in col D the below will give you
the count of dates which are in the year 2010 and col g with a value of 1.
=SUMPRODUCT((TEXT(D34:D65536,"yyyy")="2010")*(G34: G65536=1))

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I am sorting a set of data by date and range:

2006 1473
2006 854
2007 1577
2007 923
2008 2548
2008 1209
2009 1009
2009 2183

I am sorting by <1000, 1000 <1500, 1500 <2000, 2000 and I was able to use
=SUMPRODUCT(--(D34:D65536=2009)*(G34:G65536=1)) to get the results I was
looking for and it worked for 2007, 2008, 2009. I put in some test data to
check and make sure it would continue working when we hit 2010, but for some
reason it will not work. Is there a better formula I should be using? What
did I do?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kat Kat is offline
external usenet poster
 
Posts: 56
Default problem with the formula?

Below is the data and I am using
=SUMPRODUCT(--(D34:D65536=2004)*(G34:G65536=3))

2004 3
2004 9
2004 3
2004 3
2005 9
2005 3
2005 9
2005 3
2005 3
2005 3
2005 9
2006 3
2006 9
2006 3
2006 3


It is working for every year except 2010.


"Jacob Skaria" wrote:

Please post a sample data (10 to 15 rows) and the formula you tried (which
gives a mismatch). We can work that out.

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I figured out the range, but when I try using the formula for simpler things
I keep getting a value of zero...

2006 1
2006 4
2006 5
2006 1

"Jacob Skaria" wrote:

What your formula does is count how many rows are there where col D is having
the number 2009 (not a date) and col G having the number 1
=SUMPRODUCT((D34:D65536=2009)*(G34:G65536=1))

As mentioned in your query if you have date in col D the below will give you
the count of dates which are in the year 2010 and col g with a value of 1.
=SUMPRODUCT((TEXT(D34:D65536,"yyyy")="2010")*(G34: G65536=1))

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I am sorting a set of data by date and range:

2006 1473
2006 854
2007 1577
2007 923
2008 2548
2008 1209
2009 1009
2009 2183

I am sorting by <1000, 1000 <1500, 1500 <2000, 2000 and I was able to use
=SUMPRODUCT(--(D34:D65536=2009)*(G34:G65536=1)) to get the results I was
looking for and it worked for 2007, 2008, 2009. I put in some test data to
check and make sure it would continue working when we hit 2010, but for some
reason it will not work. Is there a better formula I should be using? What
did I do?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default problem with the formula?

There are no 2010 in your sample...

With the below sample the formula will return 3 which means there are 3
entries of 2010 for which a value of 3 is there in Column B
=SUMPRODUCT((A1:A10=2010)*(B1:B10=3))

2010 3
2006 9
2015 3
2009 4
2008 5
2010 3
2008 7
2010 3
2003 3
2002 2
2010 1

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

Below is the data and I am using
=SUMPRODUCT(--(D34:D65536=2004)*(G34:G65536=3))

2004 3
2004 9
2004 3
2004 3
2005 9
2005 3
2005 9
2005 3
2005 3
2005 3
2005 9
2006 3
2006 9
2006 3
2006 3


It is working for every year except 2010.


"Jacob Skaria" wrote:

Please post a sample data (10 to 15 rows) and the formula you tried (which
gives a mismatch). We can work that out.

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I figured out the range, but when I try using the formula for simpler things
I keep getting a value of zero...

2006 1
2006 4
2006 5
2006 1

"Jacob Skaria" wrote:

What your formula does is count how many rows are there where col D is having
the number 2009 (not a date) and col G having the number 1
=SUMPRODUCT((D34:D65536=2009)*(G34:G65536=1))

As mentioned in your query if you have date in col D the below will give you
the count of dates which are in the year 2010 and col g with a value of 1.
=SUMPRODUCT((TEXT(D34:D65536,"yyyy")="2010")*(G34: G65536=1))

If this post helps click Yes
---------------
Jacob Skaria


"Kat" wrote:

I am sorting a set of data by date and range:

2006 1473
2006 854
2007 1577
2007 923
2008 2548
2008 1209
2009 1009
2009 2183

I am sorting by <1000, 1000 <1500, 1500 <2000, 2000 and I was able to use
=SUMPRODUCT(--(D34:D65536=2009)*(G34:G65536=1)) to get the results I was
looking for and it worked for 2007, 2008, 2009. I put in some test data to
check and make sure it would continue working when we hit 2010, but for some
reason it will not work. Is there a better formula I should be using? What
did I do?

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
formula problem Gary Excel Discussion (Misc queries) 4 October 29th 08 01:36 PM
Formula problem sunnydazy Excel Discussion (Misc queries) 3 June 7th 08 03:03 PM
Formula problem Janet Excel Worksheet Functions 7 May 24th 07 04:48 PM
Problem with formula =MAX(A1-40,0) Lee Excel Discussion (Misc queries) 2 May 1st 06 04:18 AM
Formula problem Di Excel Discussion (Misc queries) 1 April 26th 05 04:13 PM


All times are GMT +1. The time now is 01:13 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"