alabamatoy
New Member
- Joined
- Oct 31, 2017
- Messages
- 3
Excel 2013 macro code snippet:
This formula within the quotes works (I'm using it in another excel file), but when the above code snippet sets the cell value, the actual resulting formula is:
which does NOT work. Why are there single quotes inserted around every cell reference, and how do I rectify this?
TIA....
Code:
ActiveCell.FormulaR1C1 = "=MID(D2,FIND(""."",D2,1)+1,FIND(""."",D2,FIND(""."",D2,1)+1)-FIND(""."",D2,1)-1)"
This formula within the quotes works (I'm using it in another excel file), but when the above code snippet sets the cell value, the actual resulting formula is:
Code:
=MID(D2,FIND(".",'D2',1)+1,FIND(".",'D2',FIND(".",'D2',1)+1)-FIND(".",'D2',1)-1)
which does NOT work. Why are there single quotes inserted around every cell reference, and how do I rectify this?
TIA....