+ Reply to Thread
Results 1 to 6 of 6

Autofill Formula upon data entry

  1. #1
    Registered User
    Join Date
    12-20-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    14

    Cool Autofill Formula upon data entry

    I am new to the forum and no VBA expert but am learning. Hello all.

    I need a procedure that autofills a formula down when the user enters data in a row. For example suppose I have the following data, where column E contains a formula that multiplies the values accross row of entered data:

    A B C D E
    1 Product X 2 5 8 =2*5*8
    2 Product Y 5 8 1 ???????

    I need to write a procedure that says, "if there is text in any cell in Column A, then column E needs to execute the formula. So if the user enters any text in A2, then E2 automatically calculates B2*C2*D2.

    Any help much appreciated,

    Bob B

  2. #2
    Registered User
    Join Date
    12-20-2012
    Location
    Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    3

    Thumbs up Re: Autofill Formula upon data entry

    Here you BOB,
    I have attached a sample file, offering to your problem. let me know if it goes for you.
    stay blessed

  3. #3
    Registered User
    Join Date
    07-08-2012
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2003
    Posts
    79

    Re: Autofill Formula upon data entry

    was working on something similar the other day, this is what i came up with. can be greatly improved!

    Please Login or Register  to view this content.
    Last edited by gwsampso; 12-20-2012 at 11:48 PM. Reason: fixed code

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Autofill Formula upon data entry

    hi rlbush2, another alternative is to select your current data & press CTRL + T to convert it to a Table. whenever you type a new entry, it'll recognise as part of a Table. you can remove formatting as you click the Table. go to Design
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Registered User
    Join Date
    12-20-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Autofill Formula upon data entry

    Thank you for your response,

    This code results in the following error which I am not familiar with.

    Compile error:

    Ambiguous name detected: Worksheet_Change


    I have another Worksheet_Change procedure in the VBA module and I suspect it has something to do with this?

  6. #6
    Registered User
    Join Date
    12-20-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Autofill Formula upon data entry

    I got it!

    Thanks everyone much appreciated.

    Bob B

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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