+ Reply to Thread
Results 1 to 4 of 4

Automatically copy formula from a cell when new entries are added to an Excel database.

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    21

    Automatically copy formula from a cell when new entries are added to an Excel database.

    Please can anyone help, I am trying to get VBA code in Excel to copy formula in specific cells to copy the cell below when an entry is added to a database.

    I have attached a spreadsheet, if anyone can help, you have my thanks. Cheers, J.
    Attached Files Attached Files

  2. #2
    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,549

    Re: Automatically copy formula from a cell when new entries are added to an Excel database

    You don't need a macro, just adjust the formula in cell B2 to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and convert the data list to a Table.

    As soon as you enter data in column B it will insert the formula in the corresponding cell in column A.

    See the updated example.


    Regards, TMS
    Attached Files Attached Files
    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


  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Automatically copy formula from a cell when new entries are added to an Excel database

    Thank you for your help. In the problem I have used the same formula as you but I don't want to copy and paste for a 1000 lines or so. I won't be using the database it will be my colleague who is not so excel literate.

    I have simplified the problem also there are many other columns with quite a few I want to auto populate once they see a project title (entered in from a UserForm).

    If you can help, thank you so much, J.

  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,549

    Re: Automatically copy formula from a cell when new entries are added to an Excel database

    You don't have to copy and paste any lines. In a Table, you only have rows where data is present. As soon as you enter data manually, it will insert formulae, formatting, conditional formatting and Data Validation. Nothing to do.

    Excel stores the formatting and formula (somehow) in the first row of data and it just extrapolates from that.

    Suggest you put up a more realistic sample and/or try it yourself.


    Regards, TMS

+ 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. Automatically copy formula down when new line is added to table
    By justmatt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-09-2014, 06:11 AM
  2. Replies: 5
    Last Post: 04-03-2013, 04:15 PM
  3. If data added to Excel cell it automatically make's another cell equal zero
    By ianjohnmurray@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2005, 01:05 PM
  4. Copy new data being added automatically to sheet2
    By Banks in forum Excel General
    Replies: 3
    Last Post: 09-05-2005, 01:05 PM
  5. Replies: 4
    Last Post: 04-02-2005, 12: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