+ Reply to Thread
Results 1 to 4 of 4

Calculate formula in VBA instead of formula in workbook

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    Calculate formula in VBA instead of formula in workbook

    Hi all,

    Just a small but annoying query.

    I have a column of dates and to the right their week number using the formula =weeknum(rc[-1],2). Ideally these week numbers would be values rather than a formula and I am able to use VBA to enter the formula and then copy and paste the answers as values.

    My query is whether I could get the calculations to work in VBA so that the values go directly in to the workbook or whether I need to do what I am currently doing.

    My current code is below to enter the formulas.

    Many thanks for you time and help

    Please Login or Register  to view this content.
    Last edited by Jessica.Bush; 09-11-2010 at 04:09 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Calculate formula in VBA instead of formula in workbook

    You could use

    Please Login or Register  to view this content.

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Calculate formula in VBA instead of formula in workbook

    Please Login or Register  to view this content.
    Last edited by snb; 09-11-2010 at 07:18 AM.



  4. #4
    Forum Contributor
    Join Date
    03-24-2009
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    178

    Re: Calculate formula in VBA instead of formula in workbook

    Thank you both!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1