Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning formula into a cell
I would like to return the results of a formula into a cell based on an
address that I've stored in code. Unfortunately, the result does not provide me with a value from the formula. Here is the code I've typed: Dim LastLineAddress As String LastLineAddress = ActiveCell.Address ActiveCell.Offset(2, 0).Range("A1").Select ActiveCell.FormulaR1C1 = "+mid(" & (LastLineAddress) & ",5,2)" End Sub Here is the result in the spreadsheet: Cell C149: 12345678 Cell C150 Cell C151 +mid($C$149,5,2) What I was hoping for in Cell C151 was the value 56 to be displayed, not the string +mid($C$149,5,2). Also I'd prefer not to have the absolute references ($) in the formula. Can you help me out? Many thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
need formula returning a blank cell | Excel Discussion (Misc queries) | |||
VLookup returning #N/A when looking up a cell that has a Formula i | Excel Discussion (Misc queries) | |||
Returning the formula in another cell | Excel Worksheet Functions | |||
Returning the formula in a cell | Excel Discussion (Misc queries) | |||
Returning value of a cell containing a formula | Excel Programming |