+ Reply to Thread
Results 1 to 7 of 7

Formula for Repeating Column B data according to the Column A data

  1. #1
    Registered User
    Join Date
    09-25-2014
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    4

    Formula for Repeating Column B data according to the Column A data

    Hi Team,

    Please see the attached excel, i need a short cut to make Column B data to repeat each item in column A,

    I tried some excellent formula from this forum, but that will not fit to my need.

    Thanks in advance,

    Cheers.

    RGIN
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula for Repeating Column B data according to the Column A data

    This little macro will accomplish what you want on a newly added sheet.
    Please Login or Register  to view this content.
    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook (.xlsm)

    The macro is installed and ready to use.


    Make sure your data sheet is onscreen and then press Alt-F8 and select it from the macro list to run it.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    07-10-2012
    Location
    Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Formula for Repeating Column B data according to the Column A data

    you need help of VB script

    just change catagory to VBA funtions

    or do one thing paste code one by one

    example

    if pn are 4 then copy code from b3 to b10 and (total 8 values) paste 4*8 = 32 cells i.e. for I Column press f5 and in goto window type "i1:i32" just paste

    and now for pn copy a3:a6 and paste it for 8 times and sort it in another sheet and paste in H column

  4. #4
    Registered User
    Join Date
    09-25-2014
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula for Repeating Column B data according to the Column A data

    JBeaucaire thanks, i will try and let you know, on question can any modification of the below formula will help with out macro.

    IF(ROWS($1:1)>MAX($J:$J),"",INDEX(G:G,MATCH(ROWS($1:1)-1,$J:$J)+1). this i found from another thread in this forum but it will repeat both Colum A and Column B to certain times, but that will not fill my concern.

    But i am okay with your Macro.

    @morevijay1982, thanks for you quick reply to my issue, but i didn't understand what you mentioned.

  5. #5
    Registered User
    Join Date
    09-25-2014
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula for Repeating Column B data according to the Column A data

    Update, JBeaucaire it worked in my case perfectly. Please check if any way we can make it with formula.

    Thanks once again.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula for Repeating Column B data according to the Column A data

    Sorry, the macro is the way I would (and did) solve this problem. The formula version isn't on my radar.


    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    09-25-2014
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    4

    Re: Formula for Repeating Column B data according to the Column A data

    No issues JBeaucaire, I just asked, but yours was the solution for my issue and i did it with you macro.

+ 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. Replies: 3
    Last Post: 12-12-2013, 04:00 PM
  2. converting a column of repeating data to rows?
    By Space1471 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2010, 08:39 AM
  3. Mark repeating data (specific conditions) in the column
    By seafarer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2008, 05:31 PM
  4. Repeating data in 1 column to multiple columns
    By tjones in forum Excel General
    Replies: 2
    Last Post: 12-07-2007, 07:50 PM
  5. lookup with repeating data in column a
    By kiki_lallissee in forum Excel General
    Replies: 5
    Last Post: 02-26-2007, 04:48 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