×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

calculating the distance between cells in excel (randomize moving cells)

calculating the distance between cells in excel (randomize moving cells)

calculating the distance between cells in excel (randomize moving cells)

(OP)
Suppose I want to compute the distance between a 3by4 cells in a square grid in excel. The distance between two cells is 1m.
Each grid cell is a number between 1 and 12 but randomized so every number can be anywhere.

For instance: (example in the bottom-left side of the grid):

1___2___3___4

5___6___7___8

9__10__11__12


distance between cells 1 and 5 is 1
distance between cells 1 and 6 is 2
distance between cells 1 and 12 is 5

the grid can also be this and other randomized forms:
1___7___9___12

8___2___6___11

10__8___3___4

Is it possible to have the formula to be able to calculate all of the distance between 2 cells????


Thanks for any help in advance! :)

RE: calculating the distance between cells in excel (randomize moving cells)

Formulas? No.

RE: calculating the distance between cells in excel (randomize moving cells)

Actually, I might take that back.

If we're allowed to cheat.

RE: calculating the distance between cells in excel (randomize moving cells)

With a set of MATCH formulas it is possible to find row and column of a given number in table, next x and y distances can be calculated using ABS.

combo

RE: calculating the distance between cells in excel (randomize moving cells)

How are you wanting to identify the cells you are measuring between? If you know the cells (e.g B1 and D3) it is easy. If you want to identify the, from the numbers they contain (i.e find the distance between 12 and 7, no matter where they are in the array, then that's more difficult to do in a single formula)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close