Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
'paste special', 'paste link' formatting transfer jrebello Excel Discussion (Misc queries) 2 July 25th 07 08:46 AM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Paste and Paste Special command are not enabled in Excel mcalder219 Excel Worksheet Functions 0 April 26th 06 06:57 PM


All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"