ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting differences in numbers across columns (https://www.excelbanter.com/excel-worksheet-functions/17304-counting-differences-numbers-across-columns.html)

Ted Metro

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?



Jason Morin

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?


.


Ted Metro

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?


.



Bob Phillips

=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