+ Reply to Thread
Results 1 to 5 of 5

Code to Copy Formula from Sheet2 and Paste in all available Sheets in Defined Cell

  1. #1
    Registered User
    Join Date
    08-07-2022
    Location
    Canada
    MS-Off Ver
    2021
    Posts
    39

    Code to Copy Formula from Sheet2 and Paste in all available Sheets in Defined Cell

    Hi,

    In the attached file, from A3 onward i have Formulas. From B3 onward, i have Sheet names. And from C3 onward, i have cell address into which formula is to be pasted. This cell address is EL37 and is same for all sheets.
    As you can see in the attached file, cell B3=Sheet1 and C3=EL37, so code should copy formula from cell A3 and paste into cell EL37 of Sheet1. After pasting code should also drag formula from cell EL37 to Cell EL1442.
    Next, As cell B4=Sheet2 and C3=EL37, so code should copy formula from cell A4 and paste into cell EL37 of Sheet2. After pasting code should also drag formula from cell EL37 to Cell EL1442. And so on,
    Please see attached sample file for more clarification. (I am using Excel 2021)

  2. #2
    Forum Contributor
    Join Date
    12-10-2013
    Location
    Mississippi, United States
    MS-Off Ver
    2016
    Posts
    120

    Re: Code to Copy Formula from Sheet2 and Paste in all available Sheets in Defined Cell

    Here is a code that should work.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Code to Copy Formula from Sheet2 and Paste in all available Sheets in Defined Cell

    This should do that you describe:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Registered User
    Join Date
    08-07-2022
    Location
    Canada
    MS-Off Ver
    2021
    Posts
    39

    Re: Code to Copy Formula from Sheet2 and Paste in all available Sheets in Defined Cell

    Hi WideBoyDixon,

    Thank you so much. It worked perfectly. Thanks again

  5. #5
    Registered User
    Join Date
    08-07-2022
    Location
    Canada
    MS-Off Ver
    2021
    Posts
    39

    Re: Code to Copy Formula from Sheet2 and Paste in all available Sheets in Defined Cell

    Hi aworfolk,

    Thank you for this code. It successfully pasted formulas in all sheets. But it did not drag them from cell EL37 to Cell EL1442.

+ 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] VBA code for Matching cell value between two sheets and copy and paste the row value
    By bala04msw in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-08-2021, 03:27 AM
  2. Copy cells in a defined range > 0, paste in a defined cell on other worksheet
    By Jackson2806 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2019, 08:52 PM
  3. If Cell is Highlighted -> Copy Row and Paste in Sheet2
    By CC268 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2017, 11:49 AM
  4. [SOLVED] VBA Code: Copy paste from sheet1 to next avaiable row in sheet2
    By leigh12483 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 07:31 PM
  5. Copy, paste, replace- user defined range in all the defined sheets
    By aganesan99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2014, 12:28 PM
  6. [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

Tags for this Thread

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