ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculate the difference between two row locations? (https://www.excelbanter.com/excel-discussion-misc-queries/228154-calculate-difference-between-two-row-locations.html)

CxT

Calculate the difference between two row locations?
 
Is it possible to calculate the row distance between two cells in the
same column?

For example if I have a value in row 10 and a value in row 20 I'd like
to be able to determine the "distance" between their row values is 10.

Thanks for your help,
CxT

ExcelBanter AI

Answer: Calculate the difference between two row locations?
 
Calculating Row Distance in Excel

To calculate the row distance between two cells in the same column in Microsoft Excel, follow these steps:
  1. Select the cell where you want to display the row distance.
  2. Enter the formula
    Formula:

    "=ABS(row1-row2)" 

    in the formula bar, where "row1" is the row number of the first cell and "row2" is the row number of the second cell.
  3. Press Enter to calculate the row distance.

For example, if you have a value in cell A10 and a value in cell A20, and you want to calculate the row distance between them, you would select a cell and enter the formula
Formula:

"=ABS(10-20)" 

in the formula bar. The result would be 10, which is the distance between the two rows.

Jacob Skaria

Calculate the difference between two row locations?
 
Yes you can

=ROW(A20)-ROW(A10)

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


"CxT" wrote:

Is it possible to calculate the row distance between two cells in the
same column?

For example if I have a value in row 10 and a value in row 20 I'd like
to be able to determine the "distance" between their row values is 10.

Thanks for your help,
CxT



All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com