+ Reply to Thread
Results 1 to 6 of 6

copy Formula & paste in same column next cell when previous column is not blank

  1. #1
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    393

    Lightbulb copy Formula & paste in same column next cell when previous column is not blank

    Hi,
    I need a macro for the following condition

    In A2 : I entered any text or number

    Then the formula of B1, C1, D1 must get copied in B2, C2, D2 & so on.

    thanks in advance

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,791

    Re: copy Formula & paste in same column next cell when previous column is not blank

    Place this code in the Worksheet_Change Event in the VBE for your sheet

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,587

    Re: copy Formula & paste in same column next cell when previous column is not blank

    Why don't you convert the data to a Structured Table. That will automatically copy formulae down to new rows and you won’t need VBA.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,587

    Re: copy Formula & paste in same column next cell when previous column is not blank

    @Alan ... and switch Event Handling off and on again

  5. #5
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    393

    Re: copy Formula & paste in same column next cell when previous column is not blank

    Please find the attachment of the sample file & @alan the macro provided by you isn't functioning kindly see the file.
    Kindly tell me how it works OR how I can use it to function properly?
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    2016 .......
    Posts
    393

    Lightbulb Re: copy Formula & paste in same column next cell when previous column is not blank

    I have got this code on other site....
    It's not worked properly even if I have not deleted above blank rows of data of column F

    I want to copy only formula rows as well as when I copy multiple cells i.e. records & paste in column F below last records then code must be worked....
    Please find attachment for your kind perusal.

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

+ 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] Date Dependent VBA: copy formula to next column and paste values of previous column
    By elleb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-06-2020, 10:00 AM
  2. [SOLVED] Macro to Concatenate, copy and paste the formula until the last row of the previous column
    By venkat.ramamoordhy1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2013, 04:03 PM
  3. [SOLVED] Macro to Copy Formating from Previous Column and Paste into Last Column
    By rmmohan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2013, 09:37 AM
  4. [SOLVED] Find certain word, copy and paste cell in previous row if previous row is blank
    By steven_e in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2013, 12:53 PM
  5. Copy formula down to last row of previous column which has blank rows on top
    By sam747 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-11-2012, 08:24 PM
  6. Replies: 0
    Last Post: 10-05-2012, 09:27 AM
  7. Replies: 12
    Last Post: 05-04-2010, 04:35 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