View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Changing Cell location within a formula

assume the user will enter the cell addresses in A1 to A4. For example, to
use your existing addresses:

A1: B8
A2: B7
A3: C8
A4: C7

then your formula would be

=SQRT((INDIRECT(A1)-INDIRECT(A2))^2+(INDIRECT(A3)-INDIRECT(A4))^2)

--
Regards,
Tom Ogilvy



"woknick " wrote in message
...
How can change the cell locations within a formula. Here is my formula

=SQRT((B8-B7)^2+(C8-C7)^2)

I want to be able to substitute user inputs for the B7,B8,C7, and C8.

Please let me know how to change those locations to variables.

thanks in advance


---
Message posted from http://www.ExcelForum.com/