Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing Cell location within a formula

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 advanc

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Changing Cell location within a formula

Hi

set up an area of the worksheet to be where your users input the cell
references they want to use
i've chosen A11:A14
then change the formula as follows

=SQRT((INDIRECT(A11)-INDIRECT(A12))^2+(INDIRECT(A13)-INDIRECT(A14))^2)

Regards
JulieD

"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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
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/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing Cell location within a formula

That seems like that will work, lets say I have 2 colums of numbers:

X and Y
2 6
3 8
3 5
5 4

reference 9 and 4

and I want excel to use a fixed user input for the B7 and C7 and hav
the program step through the displayed X and Y numbers

example:

=SQRT((2-9)^2+(6-4)^2)
=SQRT((3-9)^2+(8-4)^2)
and so on.
I need excell to step through each number.

Thanks in advanc

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing location of comment when hovering over cell doasidont Excel Discussion (Misc queries) 2 March 9th 07 08:45 PM
Using Dynamic Cell Address As Formula Location [email protected] Excel Worksheet Functions 4 March 6th 07 06:37 AM
macro help for changing data (cell location) in edit find box Jim Excel Discussion (Misc queries) 1 November 10th 06 10:57 PM
how to auto increment cell location within formula Bill Excel Worksheet Functions 3 February 16th 06 02:23 PM
How can a formula get the location of the cell it is placed in? Bernard[_4_] Excel Programming 3 February 16th 04 02:35 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"