+ Reply to Thread
Results 1 to 5 of 5

Formula to change Qty value to list of data

  1. #1
    Registered User
    Join Date
    05-18-2009
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Formula to change Qty value to list of data

    I receive data from a customer such as in file "Applied Data.xls"
    Column A is Quantity. Column B is data.

    I need to come up with a list of data with individual lines for duplicates rather than a Quantity Column. For example Qty 15 of Data 9929 in first line of file must show "9929" listed 15 times in Column A.

    2nd attachment shows the file I need with example data & quantities. Cells A1, "Applied1" and A2 "txtField1" must remain UNCHANGED (but could be added after manually if needed).
    Can a formula be written to take data from "Applied Data.xls" and create a new file (or tab) looking like "Applied1.csv" ?

    It must work with any number of records. For example, there may be dozens of data records with multiple Qtys required of each.
    Open to suggestions. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Formula to change Qty value to list of data

    Use this macro to put the data in column D (you could put it in another Tab if you wished but its easier to see in column D)

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula to change Qty value to list of data

    If you're looking for a formula solution, with your data in Column A and Column B (as in your sample file), use this this array formula in a separate column

    =IF(ROW($A1)>SUM($A:$A),"",LOOKUP(ROW($A1)-1,MMULT(IF(ROW($A$1:$A$3)-1>=TRANSPOSE(ROW($A$1:$A$3))=TRUE,1,0),$A$1:$A$3),$B$1:$B$3))

    Copy down as far as you like

    Adjust ranges and references for your actual data
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    05-18-2009
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Formula to change Qty value to list of data

    Hi Ace,
    Thanks for your help, but I tried the formula in C1 and i'm getting a #VALUE error?

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula to change Qty value to list of data

    I should've mentioned, the formula needs to be array entered

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

+ 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. Dependent Dropdown list change to formula when parent cell change
    By yuvanesh11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2019, 04:00 AM
  2. [SOLVED] Data validation lists change source designation when list data is updated.
    By frenurks in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2015, 06:52 AM
  3. Replies: 5
    Last Post: 02-01-2013, 12:58 PM
  4. Replies: 0
    Last Post: 01-09-2013, 11:44 AM
  5. [SOLVED] Macro to change data entered in a cell seperated by a comma, into a vertical list of data
    By jholly3 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-13-2012, 03:51 PM
  6. Replies: 3
    Last Post: 07-20-2012, 09:52 AM
  7. Replies: 1
    Last Post: 05-25-2009, 05:19 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