LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
ASU ASU is offline
external usenet poster
 
Posts: 63
Default copy formula using VB code

Thanks very much. Unfortunately I have changed the form slightly.
What I could do with now is a code that would copy and paste the formula,
say in cell "H11", and paste it in the next cell "H12". and when cell "H12"
is filled with a value, the formula is pasted to the next cell("H13"), and so
on.
I hope it's clear.
Thank you
--
ASU


"T Kirtley" wrote:

Would something like the following work?

Sub CopyFormula()
Dim Frm As String
Frm = ActiveCell.Formula
Worksheets.Add
Range("A1").Formula = Frm
End Sub

You no doubt would want to add more code but this may get you started.

HTH,

TK

"ASU" wrote:

How do you copy and paste (using VB code) a cell formula to a newly created
spreadsheet.
--
ASU

 
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
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
formula or vba code Nader Excel Worksheet Functions 14 August 16th 06 10:54 AM
Complicated If Then / V Lookup / Match Statement... ryesworld Excel Worksheet Functions 17 December 10th 05 02:09 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Howdo U copy a formula down a column, that uses data in another w. Need Help pasting a formula Excel Worksheet Functions 1 February 25th 05 06:04 PM


All times are GMT +1. The time now is 10:46 PM.

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

About Us

"It's about Microsoft Excel"