+ Reply to Thread
Results 1 to 3 of 3

Paste a formula in a cell with a Macro

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Groenlo, Netherlands
    MS-Off Ver
    Excel 2019
    Posts
    63

    Paste a formula in a cell with a Macro

    as part of I Macro I am trying to paste a formula in a cell, but get an error.

    [K6].Formula = _
    "=VERGELIJKEN(J6;'Basiskalk.'!B:B;0)"

    What am I doing wrong here? I tried to use COMPARE instead of VERGELIJKEN, but that didn't help me either.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Paste a formula in a cell with a Macro

    As well as using COMPARE change the ; to ,.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-31-2012
    Location
    Groenlo, Netherlands
    MS-Off Ver
    Excel 2019
    Posts
    63

    Re: Paste a formula in a cell with a Macro

    thank's, it's excecuted now, but the ' ' are now removed. Tried with ", "" and variations, but don't get it to work properly yet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] want to edit recorded macro code or copy a cell with formula and paste it down to "x" cell
    By bmbalamurali in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 10-25-2013, 04:57 PM
  2. [SOLVED] Macro to copy a cell range and paste to a new sheet 'n' times where 'n' defined by formula
    By staminaboy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2013, 11:39 AM
  3. [SOLVED] VBA macro to check if one cell has text and paste a formula in a different cell
    By vitt4300 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2013, 01:38 PM
  4. Macro to Paste Formula into Cell on Spread Sheet
    By scass in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2013, 02:56 AM
  5. [SOLVED] Copy and Paste macro needs to paste to a changing cell reference
    By loulou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2005, 07:06 AM

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