Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula to a cell
Hi All.......
I am trying to put a formula in a cell and Excel keeps changing it on me...... I use the following line of code.... ActiveCell.FormulaR1C1 = "=Right(CELL(""FILENAME"",A1),4)" and the formula in the cell turns out to be.... =RIGHT(CELL("FILENAME",'A1'),4) which is wrong and gives me a #NAME? return. Any help would be appreciated. Vaya con Dios, Chuck, CABGx3 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula to a cell
Sub clr()
ActiveCell.Value = "=Right(CELL(" & Chr(34) & "FILENAME" & Chr(34) & ",A1),4)" End Sub -- Gary's Student gsnu200704 "CLR" wrote: Hi All....... I am trying to put a formula in a cell and Excel keeps changing it on me...... I use the following line of code.... ActiveCell.FormulaR1C1 = "=Right(CELL(""FILENAME"",A1),4)" and the formula in the cell turns out to be.... =RIGHT(CELL("FILENAME",'A1'),4) which is wrong and gives me a #NAME? return. Any help would be appreciated. Vaya con Dios, Chuck, CABGx3 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula to a cell
That did the trick, kind Sir, and I thank you very much. I used the same
technique to modify another formula in the same boat and it worked fine as well. I find that whole process rather clumbsy and user hostile, but if it works, what the hey!.......... Thanks again, muchly........... Vaya con Dios, Chuck, CABGx3 "Gary''s Student" wrote in message ... Sub clr() ActiveCell.Value = "=Right(CELL(" & Chr(34) & "FILENAME" & Chr(34) & ",A1),4)" End Sub -- Gary's Student gsnu200704 "CLR" wrote: Hi All....... I am trying to put a formula in a cell and Excel keeps changing it on me...... I use the following line of code.... ActiveCell.FormulaR1C1 = "=Right(CELL(""FILENAME"",A1),4)" and the formula in the cell turns out to be.... =RIGHT(CELL("FILENAME",'A1'),4) which is wrong and gives me a #NAME? return. Any help would be appreciated. Vaya con Dios, Chuck, CABGx3 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I make a blank cell in a formula cell with a range of cell | Excel Discussion (Misc queries) | |||
Subtract cell formula from existing cell formula | Excel Programming | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Question: Cell formula or macro to write result of one cell to another cell | Excel Programming |