+ Reply to Thread
Results 1 to 12 of 12

Auto Transfer Cell Contents Multiple Times to Another Column

  1. #1
    Registered User
    Join Date
    12-01-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    4

    Auto Transfer Cell Contents Multiple Times to Another Column

    Hey guys, I'm new here. Familiar with Excel but not a guru by any stretch. An image is attached showing what I want to do...and I'm sure it's doable but I'm not aware of the method to do it. It may require a VB script as well...

    I want to be able to paste a string of part numbers into a column, it be recognized by the four letter acronym, and a specified number of that part then pasted (consecutively) into a column on another sheet. I don't have an example sheet yet as we're just planning at the moment and this is the "hard" part.

    Thanks for any direction or ideas you may be able to give :-)

    Image.jpg

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

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    See attached file, which uses formulae only.

    Column B generates the number of times each entry needs to be duplicated, using this formula in B2:

    =IF(COUNTIF(A2,"*PGGV*"),2,IF(COUNTIF(A2,"*BGGL*"),4,IF(COUNTIF(A2,"*PALG*"),1,0)))

    Column C is just a cumulative count for those numbers (note the zero in C1), and column E gives you the result using this formula in E2:

    =IF(ROWS($1:1)>MAX(C:C),"",INDEX(A:A,MATCH(ROWS($1:1)-1,C:C)+1))

    which can be copied down sufficiently far to display all the values.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    I have used file of Pete_UK .
    This is lengthy formula but without helper column.
    In G2 then copied down
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

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

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    It still uses column B as a helper.

    By the way, your profile still shows XL2007, though you wouldn't be able to use the AGGREGATE function if you are still using that, so please update your profile.

    Pete

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    Hi Pete_UK
    Column B is required. How to know which value is to be repeated how many times.
    Profile updated.
    KVS

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

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    Thanks for updating your profile.

    I was given XL2019 last year as a Christmas present, but I still haven't installed it yet - I'm a dinosaur !!

    Pete

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    I got 2019 version few days back only.

  8. #8
    Registered User
    Join Date
    12-01-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    4

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    You guys are fantastic. This appears to be what I'm looking for - I'll try it out later today and report back. Thanks for the help!

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

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    Glad to help.

    If, after trying the proposed solutions out, you feel 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, 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

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    For MS365 please try

    =FILTERXML(SUBSTITUTE(CONCAT(REPT("</m><m>"&A2:A5,MMULT(--ISNUMBER(FIND({"PALG","PGGV","BGGL"},A2:A5)),{1;2;4}))),"</m>","<x>",1)&"</m></x>","//m")
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-01-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    4

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    It's easier to use the code, at least in our circumstance, with the helper column. All obviously work and I'll play with the concat option as well. Rep added - thanks everyone for the great input!
    Last edited by Dilhack; 12-02-2020 at 05:03 PM.

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Auto Transfer Cell Contents Multiple Times to Another Column

    Thanks for feed back.

+ 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] Transfer contents of cell from A1 to D2
    By barrowinfurnace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2020, 09:20 AM
  2. [SOLVED] Copy column range in the same column multiple times based on cell value
    By PaulM100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-15-2019, 06:22 AM
  3. [SOLVED] Transfer Contents from one cell to another
    By TBM in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-10-2016, 11:48 PM
  4. Replies: 3
    Last Post: 08-09-2015, 06:58 PM
  5. Replies: 2
    Last Post: 05-21-2014, 12:59 PM
  6. [SOLVED] Transfer all contents of multiple woorkbooks to one workbook.
    By johnch in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2012, 01:42 AM
  7. link cell contents for auto-fill oif second column
    By Notumbo in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-24-2009, 05:10 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