![]() |
maximum difference
I have two columns of data, say in column A and B. I would like to find the
maximum relative difference between the values in A1 & B1 vs. A2 and B2 vs. A3 and B3 etc... Each column may have up to 300 entries. My simplistic way to do this is to subtract the two numbers in a third column and then find the max of this column. Is there another way to do this with a single formula or function without an intermediate step such as creating the extra column? Thanks. |
Answer: maximum difference
Finding Maximum Relative Difference Between Two Columns
Yes, there is a way to find the maximum relative difference between two columns without creating an extra column. You can use the Formula:
Formula:
Formula:
This formula calculates the relative difference between the values in each row by dividing the values in column A by the values in column B, then subtracting the result of the second row from the first row, the result of the third row from the second row, and so on. The Formula:
Formula:
|
maximum difference
Use =MAX(A1:A300-B1-B300) but completed with CTRL+SHIFT+ENTER (not just
ENTER)to make it an array formula. Unclear from question if you want A1-B1 or B1-A1, so adjust formula as needed. If you want the absolute max (regardless of sign) use =MAX(ABS(A1:A300-B1-B300)) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Dan" wrote in message ... I have two columns of data, say in column A and B. I would like to find the maximum relative difference between the values in A1 & B1 vs. A2 and B2 vs. A3 and B3 etc... Each column may have up to 300 entries. My simplistic way to do this is to subtract the two numbers in a third column and then find the max of this column. Is there another way to do this with a single formula or function without an intermediate step such as creating the extra column? Thanks. |
maximum difference
Thanks so much. That's exactly what I want to do.
"Bernard Liengme" wrote: Use =MAX(A1:A300-B1-B300) but completed with CTRL+SHIFT+ENTER (not just ENTER)to make it an array formula. Unclear from question if you want A1-B1 or B1-A1, so adjust formula as needed. If you want the absolute max (regardless of sign) use =MAX(ABS(A1:A300-B1-B300)) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Dan" wrote in message ... I have two columns of data, say in column A and B. I would like to find the maximum relative difference between the values in A1 & B1 vs. A2 and B2 vs. A3 and B3 etc... Each column may have up to 300 entries. My simplistic way to do this is to subtract the two numbers in a third column and then find the max of this column. Is there another way to do this with a single formula or function without an intermediate step such as creating the extra column? Thanks. |
maximum difference
CLR pointed out a type on my formulas. Please correct to
=MAX(A1:A300-B1:B300) and =MAX(ABS(A1:A300-B1:B300)) I had wrong sign between B1 and B300 -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Dan" wrote in message ... Thanks so much. That's exactly what I want to do. "Bernard Liengme" wrote: Use =MAX(A1:A300-B1-B300) but completed with CTRL+SHIFT+ENTER (not just ENTER)to make it an array formula. Unclear from question if you want A1-B1 or B1-A1, so adjust formula as needed. If you want the absolute max (regardless of sign) use =MAX(ABS(A1:A300-B1-B300)) best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Dan" wrote in message ... I have two columns of data, say in column A and B. I would like to find the maximum relative difference between the values in A1 & B1 vs. A2 and B2 vs. A3 and B3 etc... Each column may have up to 300 entries. My simplistic way to do this is to subtract the two numbers in a third column and then find the max of this column. Is there another way to do this with a single formula or function without an intermediate step such as creating the extra column? Thanks. |
All times are GMT +1. The time now is 10:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com