![]() |
Counting differences in numbers across columns
I think this is probably pretty easy.
I have a table here is the first row (starting at a1), with numbers in individual columns A B c d e 1624 1433 1546 1244 1287 The columns represent years with A being the current year. I want to count how many years improved upon the previous year. The answer is two, C is greater than D, and A is greater than B. Of course units went down from E to D and again from C to B. How do I write a formula that can analyze the four relationships across the five years and count how many times units went down from one year to the immediately following year? |
One way:
=SUMPRODUCT(--(A1:D1B1:E1)) HTH Jason Atlanta, GA -----Original Message----- I think this is probably pretty easy. I have a table here is the first row (starting at a1), with numbers in individual columns A B c d e 1624 1433 1546 1244 1287 The columns represent years with A being the current year. I want to count how many years improved upon the previous year. The answer is two, C is greater than D, and A is greater than B. Of course units went down from E to D and again from C to B. How do I write a formula that can analyze the four relationships across the five years and count how many times units went down from one year to the immediately following year? . |
Thanks Jason, that worked great, I just needed change the '' to a '<'.
Big help!! "Jason Morin" wrote: One way: =SUMPRODUCT(--(A1:D1B1:E1)) HTH Jason Atlanta, GA -----Original Message----- I think this is probably pretty easy. I have a table here is the first row (starting at a1), with numbers in individual columns A B c d e 1624 1433 1546 1244 1287 The columns represent years with A being the current year. I want to count how many years improved upon the previous year. The answer is two, C is greater than D, and A is greater than B. Of course units went down from E to D and again from C to B. How do I write a formula that can analyze the four relationships across the five years and count how many times units went down from one year to the immediately following year? . |
=SUM(IF(B2:F2A2:E2,1,0))
which is an array formula, so commit with Ctrl-Shift-Enter -- HTH RP (remove nothere from the email address if mailing direct) "Ted Metro" wrote in message ... I think this is probably pretty easy. I have a table here is the first row (starting at a1), with numbers in individual columns A B c d e 1624 1433 1546 1244 1287 The columns represent years with A being the current year. I want to count how many years improved upon the previous year. The answer is two, C is greater than D, and A is greater than B. Of course units went down from E to D and again from C to B. How do I write a formula that can analyze the four relationships across the five years and count how many times units went down from one year to the immediately following year? |
All times are GMT +1. The time now is 06:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com