Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell shows formula and not the result of the formula. | Excel Worksheet Functions | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
looking for a formula | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions | |||
Cell doesn't show formula result - it shows formula (CTRL + ' doe. | Excel Worksheet Functions |