ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   in VBA script, make cell values = formula value, not formula (https://www.excelbanter.com/excel-programming/422431-vba-script-make-cell-values-%3D-formula-value-not-formula.html)

Solutions Manager

in VBA script, make cell values = formula value, not formula
 
Here is a snippet of my code:
Range("Z2:Z100).FormulaR1C1 =
"=IF(ISBLANK(RC1),"""",CONCATENATE(VLOOKUP(msr!R2C 2,tbl.markets,2,0),(TEXT(msr!R4C2,""mmddyy"")),""-"",(TEXT(ROW(RC[-25])-1,""000""))))"
Columns("Z:Z").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=True, Transpose:=False

Solutions Manager

in VBA script, make cell values = formula value, not formula
 
Part of my question disappeared!
So question is, instead of selecting then copying and pasting values. I want
the values to get dumped straight in. Like killing the formula after I'm done
with it only not by cutting and pasting values. Make sense?

Solutions Manager

in VBA script, make cell values = formula value, not formula
 
Nevermind. I found the answer on Ron's Excel Tips. So easy, yet so elusive.


All times are GMT +1. The time now is 05:25 PM.

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