ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using formula in code...Part 3! (https://www.excelbanter.com/excel-programming/395884-using-formula-code-part-3-a.html)

Alan M

Using formula in code...Part 3!
 

Following on from Parts 2 and 1.......!!! See previous questions of the same
title.

Bob Phillips provided me with the following code:

Range(Cells(1, 17), Cells(LastRow, 17)).FormulaR1C1 = _
"=MID(RC[-2],FIND(""."",RC[-2],1)-1,3)"


This works fine but instead of returning a resulting value...it places the
formula itself in the target range. I.e the cells contain the written formula
expression rather than the result of the calculation described by that
expression.
Anyone know why please?




Dave Peterson

Using formula in code...Part 3!
 
This was answered in the other thread.

Alan M wrote:

Following on from Parts 2 and 1.......!!! See previous questions of the same
title.

Bob Phillips provided me with the following code:

Range(Cells(1, 17), Cells(LastRow, 17)).FormulaR1C1 = _
"=MID(RC[-2],FIND(""."",RC[-2],1)-1,3)"

This works fine but instead of returning a resulting value...it places the
formula itself in the target range. I.e the cells contain the written formula
expression rather than the result of the calculation described by that
expression.
Anyone know why please?


--

Dave Peterson


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com