Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default simple question

How can I designate in a formula a cell regarding to a variable (e.g.
M(value of n) is the cell M535 if n=535 )
thank you ,
John


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default simple question

Hi John,

If I understand correctly, following should help
=CELL("contents",M535)

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default simple question

Thank you Carim,

I think my problem needs macros...

Bye

If I understand correctly, following should help
=CELL("contents",M535)

HTH
Cheers
Carim



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default simple question

=indirect("M"&a1)
if A1 contained N)

In code:
dim N as long
msgbox activesheet.range("M"&n).value
'or
msgbox activesheet.cells(n,"M").value



john wrote:

How can I designate in a formula a cell regarding to a variable (e.g.
M(value of n) is the cell M535 if n=535 )
thank you ,
John


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default simple question

Hi Dave,

thank you... i am progressing;
I am still in trouble because my needs with this is to input a result in a
cell designated by a variable;

something like that-syntax is uncorrect, but i can't do better- :

formula in cell B3 =SI(B20; "cell" M(value of n)= B2 ; "cell" M(value
of n)= 0)

in words, is it possible with a formula in one cell to put a result in
another cell, with the adresse of the last one depending on a variable...?


=indirect("M"&a1)
if A1 contained N)

In code:
dim N as long
msgbox activesheet.range("M"&n).value
'or
msgbox activesheet.cells(n,"M").value



john wrote:

How can I designate in a formula a cell regarding to a variable (e.g.
M(value of n) is the cell M535 if n=535 )
thank you ,
John


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default simple question

It looks like you're trying to change a cell by using a formula in B3.

Excel won't let formulas in one cell change another cell's value.



john wrote:

Hi Dave,

thank you... i am progressing;
I am still in trouble because my needs with this is to input a result in a
cell designated by a variable;

something like that-syntax is uncorrect, but i can't do better- :

formula in cell B3 =SI(B20; "cell" M(value of n)= B2 ; "cell" M(value
of n)= 0)

in words, is it possible with a formula in one cell to put a result in
another cell, with the adresse of the last one depending on a variable...?

=indirect("M"&a1)
if A1 contained N)

In code:
dim N as long
msgbox activesheet.range("M"&n).value
'or
msgbox activesheet.cells(n,"M").value



john wrote:

How can I designate in a formula a cell regarding to a variable (e.g.
M(value of n) is the cell M535 if n=535 )
thank you ,
John


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default simple question

well, it is exactly the aim, so no solutions....?



It looks like you're trying to change a cell by using a formula in B3.

Excel won't let formulas in one cell change another cell's value.



john wrote:

Hi Dave,

thank you... i am progressing;
I am still in trouble because my needs with this is to input a result in

a
cell designated by a variable;

something like that-syntax is uncorrect, but i can't do better- :

formula in cell B3 =SI(B20; "cell" M(value of n)= B2 ; "cell"

M(value
of n)= 0)

in words, is it possible with a formula in one cell to put a result in
another cell, with the adresse of the last one depending on a

variable...?

=indirect("M"&a1)
if A1 contained N)

In code:
dim N as long
msgbox activesheet.range("M"&n).value
'or
msgbox activesheet.cells(n,"M").value



john wrote:

How can I designate in a formula a cell regarding to a variable

(e.g.
M(value of n) is the cell M535 if n=535 )
thank you ,
John

--

Dave Peterson


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default simple question

Not using formulas.

Macros can change values in cells--but I don't think I know enough to offer a
real solution.




john wrote:

well, it is exactly the aim, so no solutions....?

It looks like you're trying to change a cell by using a formula in B3.

Excel won't let formulas in one cell change another cell's value.



john wrote:

Hi Dave,

thank you... i am progressing;
I am still in trouble because my needs with this is to input a result in

a
cell designated by a variable;

something like that-syntax is uncorrect, but i can't do better- :

formula in cell B3 =SI(B20; "cell" M(value of n)= B2 ; "cell"

M(value
of n)= 0)

in words, is it possible with a formula in one cell to put a result in
another cell, with the adresse of the last one depending on a

variable...?

=indirect("M"&a1)
if A1 contained N)

In code:
dim N as long
msgbox activesheet.range("M"&n).value
'or
msgbox activesheet.cells(n,"M").value



john wrote:

How can I designate in a formula a cell regarding to a variable

(e.g.
M(value of n) is the cell M535 if n=535 )
thank you ,
John

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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
Simple question [email protected] New Users to Excel 4 March 24th 08 07:47 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
simple vba question Jonathan Cooper Excel Discussion (Misc queries) 4 February 10th 06 07:03 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
simple question, hopefully a simple answer! Matt B Excel Programming 5 January 13th 04 08:43 PM


All times are GMT +1. The time now is 04:08 PM.

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

About Us

"It's about Microsoft Excel"