Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculating the distance between cells in excel

Status
Not open for further replies.

M8KWR

Programmer
Aug 18, 2004
864
GB
The only way i can explain this is if you think of a chess board, you have a set amount of grids.

I would like a formula to be able to calculate the distance between to cells, is this possible????

Lets say i wanted to know the distance between cells C4 & h7...

many thanks for any help in advance.
 
What do you mean? Do you mean the length of a hypothetical straight line between the cells?

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
yes, or something like that, is this possible????
 
If i understand you correctly...

=ROW(H7)-ROW(C4) + COLUMN(H7) - COLUMN(C4)



if it is to be it's up to me
 
no, i need to go in a straight line, and work out the distance as the crow fly's

 
Assuming the distance from cell to cell is 1, then the distance in a straight line is =SQRT((ROW(H7)-ROW(C4))^2 + (COLUMN(H7) - COLUMN(C4))^2)

i.e. getting the hypotenuse of the triangle formed by the 2 points and a right angle.


Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top