Results 1 to 9 of 9

VBA: Auto-fill cells based on user defined values and quantity

Threaded View

  1. #1
    Registered User
    Join Date
    03-01-2018
    Location
    Washington
    MS-Off Ver
    2013
    Posts
    19

    VBA: Auto-fill cells based on user defined values and quantity

    Hello,

    I'm trying to figure out a way using VBA where a user can specify values in 2 adjacent cells with a quantity in a 3rd cell, hit a button and have it insert the values entered a number of times equal to the quantity specified.

    Sample Input:
    Product Price QTY
    Dog Socks $2.95 4
    Cat Mittens $1.99 4

    Sample Output:
    Product Price
    Dog Socks $2.95
    Dog Socks $2.95
    Dog Socks $2.95
    Dog Socks $2.95
    Cat Mittens $1.99
    Cat Mittens $1.99
    Cat Mittens $1.99
    Cat Mittens $1.99


    The actual product list has 50+ products and the prices can vary so using formulas isn't ideal. There can also be up to 30 different types of product per order. I figure the best approach is using VBA and having the output values specified by the user, then executing it based on the # entered into the quantity, and outputting the values into the "next empty cell" on the output sheet.

    Sample workbook attached.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA error with auto fill of user defined formula
    By dquigley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2018, 12:20 PM
  2. [SOLVED] Auto-Row Fill based on Quantity of components
    By Blackhawks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2016, 04:48 PM
  3. [SOLVED] Averaging a user input defined range based on values in columns
    By smit.etha in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-14-2014, 02:21 AM
  4. VBA to select cells based on user defined dates
    By rajkumarmp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2013, 07:09 AM
  5. Need to auto sort tables or adapt formulas to fill cells based on values.
    By dropanddrive03 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2013, 12:21 PM
  6. [SOLVED] Auto fill a cell with a value based on pre-defined range.
    By kraft_mk in forum Excel General
    Replies: 2
    Last Post: 03-19-2013, 03:50 PM
  7. excel automation: auto fill up cell value out of defined matched values on sheet 2
    By randybondoc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2012, 05:01 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