Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
alMandragor
 
Posts: n/a
Default Can a Formula in Cell X modify Cell Y?

Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that possible?

Please note that there is NO Formular in Cell B1, which is the cell to be
modified...

Thanks

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

No, only through VBA

--

Regards,

Peo Sjoblom


"alMandragor" wrote in message
...
Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that

possible?

Please note that there is NO Formular in Cell B1, which is the cell to be
modified...

Thanks



  #3   Report Post  
alMandragor
 
Posts: n/a
Default

Thank you Peo,

I will try to get some info on VBA (visual basic???)

"Peo Sjoblom" wrote:

No, only through VBA

--

Regards,

Peo Sjoblom


"alMandragor" wrote in message
...
Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that

possible?

Please note that there is NO Formular in Cell B1, which is the cell to be
modified...

Thanks




  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Yes, you can just use a simple even macro like

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 1 Then Range("B1").Value = 5 Else Range("B1").Value =
6
End Sub


right click on the sheet tab in question and paste in the above, press Alt +
Q to close the VB editor
and test it
--

Regards,

Peo Sjoblom

"alMandragor" wrote in message
...
Thank you Peo,

I will try to get some info on VBA (visual basic???)

"Peo Sjoblom" wrote:

No, only through VBA

--

Regards,

Peo Sjoblom


"alMandragor" wrote in message
...
Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise

B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that

possible?

Please note that there is NO Formular in Cell B1, which is the cell to

be
modified...

Thanks






  #5   Report Post  
alMandragor
 
Posts: n/a
Default

i will try it out.

once again, thanks a lot...

regards

"Peo Sjoblom" wrote:

Yes, you can just use a simple even macro like

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 1 Then Range("B1").Value = 5 Else Range("B1").Value =
6
End Sub


right click on the sheet tab in question and paste in the above, press Alt +
Q to close the VB editor
and test it
--

Regards,

Peo Sjoblom

"alMandragor" wrote in message
...
Thank you Peo,

I will try to get some info on VBA (visual basic???)

"Peo Sjoblom" wrote:

No, only through VBA

--

Regards,

Peo Sjoblom


"alMandragor" wrote in message
...
Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise

B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that
possible?

Please note that there is NO Formular in Cell B1, which is the cell to

be
modified...

Thanks









  #6   Report Post  
alMandragor
 
Posts: n/a
Default

IT WORKED !!!

THANKS!!!!!!!!!!!!!!!!!!!!!!!!

"Peo Sjoblom" wrote:

Yes, you can just use a simple even macro like

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 1 Then Range("B1").Value = 5 Else Range("B1").Value =
6
End Sub


right click on the sheet tab in question and paste in the above, press Alt +
Q to close the VB editor
and test it
--

Regards,

Peo Sjoblom

"alMandragor" wrote in message
...
Thank you Peo,

I will try to get some info on VBA (visual basic???)

"Peo Sjoblom" wrote:

No, only through VBA

--

Regards,

Peo Sjoblom


"alMandragor" wrote in message
...
Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise

B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that
possible?

Please note that there is NO Formular in Cell B1, which is the cell to

be
modified...

Thanks







  #7   Report Post  
Myrna Larson
 
Posts: n/a
Default

If you want cell B1 to change when A1 changes, you put the formula in B1. The
formula in A1 cannot directly change B1. It can only return a result to A1. To
accomplish what you want without a formula in B1 would require VBA
programming, which seems to me (without more information about WHY you can't
put a formula in B1) to be silly in this case.


On Thu, 10 Feb 2005 08:41:03 -0800, "alMandragor"
wrote:

Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that possible?

Please note that there is NO Formular in Cell B1, which is the cell to be
modified...

Thanks


  #8   Report Post  
Myrna Larson
 
Posts: n/a
Default

Yes, it will work, BUT it slows down your worksheet because this sub runs
whenever you change ANY cell on the worksheet.

Please explain WHY you don't want a formula in B1. If you do that, that
formula will recalculate ONLY when A1 changes. It won't recalculate whenever
some other cell on the worksheet changes, as the macro does.

On Thu, 10 Feb 2005 09:33:07 -0800, "alMandragor"
wrote:

IT WORKED !!!

THANKS!!!!!!!!!!!!!!!!!!!!!!!!

"Peo Sjoblom" wrote:

Yes, you can just use a simple even macro like

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value = 1 Then Range("B1").Value = 5 Else Range("B1").Value

=
6
End Sub


right click on the sheet tab in question and paste in the above, press Alt

+
Q to close the VB editor
and test it
--

Regards,

Peo Sjoblom

"alMandragor" wrote in message
...
Thank you Peo,

I will try to get some info on VBA (visual basic???)

"Peo Sjoblom" wrote:

No, only through VBA

--

Regards,

Peo Sjoblom


"alMandragor" wrote in message
...
Example:

A Formula in Cell A1 should do the following:

If cell A1 equals 1, then cell B1 should have the value 5, otherwise

B1
should be 6.

A condition in cell A1 is changing the value of cell B1... is that
possible?

Please note that there is NO Formular in Cell B1, which is the cell

to
be
modified...

Thanks








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
Cell shows formula and not the result of the formula. stumpy1220 Excel Worksheet Functions 2 January 14th 05 06:11 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 08:18 AM
looking for a formula Amanda Excel Worksheet Functions 5 January 5th 05 08:37 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 04:13 PM


All times are GMT +1. The time now is 09:36 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"