+ Reply to Thread
Results 1 to 7 of 7

Copy cell x times, based on cell value

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    Aalborg, Denmark
    MS-Off Ver
    Excel 2016
    Posts
    3

    Copy cell x times, based on cell value

    Hi everyone
    I have a spreadsheet that controls my wine collection. Now want to use barcodes for inventory management.
    Need to print a number of barcodes that match the number of remaining bottles.

    Sheet 1 retrieves Wine ID (column A) from another spreadsheet (WineCollection). This value is converted to text with leading zeros (column B).

    Column C creates the bar code using a TrueType font

    In column D, from another spreadsheet (WineCollection), the remaining bottles of the wine is retrieved.

    In the example, I want to create 2 bar codes in row 2, 5 bar codes in row 3, etc.
    See desired result

    Think I've reached the last page on the internet, in my search for a useful method, without luck.
    Can anyone help me please?

    This is the source sheet
    example 1.PNG

    This is the wanted result
    example 2.PNG

  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
    44,087

    Re: Copy cell x times, based on cell value

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    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
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,776

    Re: Copy cell x times, based on cell value

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    05-06-2014
    Location
    Aalborg, Denmark
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Copy cell x times, based on cell value

    Attachments
    Attached Files Attached Files

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Copy cell x times, based on cell value

    You could put this formula in F2:

    =IF(COLUMNS($F:F)<=$D2,$C2,"")

    Format that cell as required, then copy across sufficient cells to cover the maximum number of items that you might have (you show 12 in the attached file). Then you can copy all those cells down for as many different wine types that you have.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    05-06-2014
    Location
    Aalborg, Denmark
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Copy cell x times, based on cell value

    Hi Pete

    I'll go with your solution, so simple, if you just known howto.

    It's working just as I expected.

    Thank You

    Best regards

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Copy cell x times, based on cell value

    You're welcome - glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum (in terms of post-count), you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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] Copy range # of times based on cell value.
    By countryfan_nt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2018, 04:08 AM
  2. Use VBA to copy sheet number of times based on cell?
    By ColdWater in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2017, 09:40 PM
  3. Copy and Paste Cell X number of times based on Adjacent Cell
    By GabeGabe in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-07-2016, 11:40 AM
  4. [SOLVED] Copy Cell to Column X times Based On Cell Value
    By Dess in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2014, 12:13 PM
  5. VBA; copy paste number of times based on cell value
    By photopidge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2011, 03:17 AM
  6. Copy Worksheet X Times Based on Cell Value
    By PY_ in forum Excel General
    Replies: 2
    Last Post: 01-04-2011, 04:10 PM
  7. copy sheet a # of times based on cell value
    By nuver in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2005, 03:34 PM

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