Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
To give paste special (value) in macros
I am using the following forumula to workout some calculation. But after that
calculation I need to change its formula into Value in the same range given the formula ie (from ActiveCell to lastrow.cell) . I need to keep its value on the same column insted of formula. Please need ur help Orginal forumal is ActiveCell.FormulaR1C1 = "=IF(COUNTIF([Item.xls]Car!C2,RC7),VLOOKUP(RC7,[Item.xls]Car!C2:C12,11,0),IF(COUNTIF([Item.xls]Truck!C2, RC7),VLOOKUP(RC7,[Item.xls]truck!C2:C12,11,0),0))" res = ActiveCell.Address res1 = Mid(res, 2, 1) With ActiveSheet lastrow = .Cells(.Rows.Count, "G").End(xlUp).Row .Range(res & ":" & res1 & lastrow).FormulaR1C1 = ..Range(res).FormulaR1C1 End With |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
To give paste special (value) in macros
If I understand you correctly, you want to replace the formula in a cell with
the value that it calculated? anyCell.Formula = anyCell.Value type of statement will do that. But I'm not certain that's what you're looking for. "pol" wrote: I am using the following forumula to workout some calculation. But after that calculation I need to change its formula into Value in the same range given the formula ie (from ActiveCell to lastrow.cell) . I need to keep its value on the same column insted of formula. Please need ur help Orginal forumal is ActiveCell.FormulaR1C1 = "=IF(COUNTIF([Item.xls]Car!C2,RC7),VLOOKUP(RC7,[Item.xls]Car!C2:C12,11,0),IF(COUNTIF([Item.xls]Truck!C2, RC7),VLOOKUP(RC7,[Item.xls]truck!C2:C12,11,0),0))" res = ActiveCell.Address res1 = Mid(res, 2, 1) With ActiveSheet lastrow = .Cells(.Rows.Count, "G").End(xlUp).Row .Range(res & ":" & res1 & lastrow).FormulaR1C1 = .Range(res).FormulaR1C1 End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Paste and Paste Special No Longer Working - Excel 2003 | Excel Discussion (Misc queries) | |||
'paste special', 'paste link' formatting transfer | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions | |||
Paste and Paste Special command are not enabled in Excel | Excel Worksheet Functions |