+ Reply to Thread
Results 1 to 16 of 16

Appling a range of data to a range of individual cells

  1. #1
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Appling a range of data to a range of individual cells

    HI,

    I am trying populate a range of products to a range of customers so that the whole range of products can be applied to each customer.

    In the files below I have a selection of the customers and products. I want to combine the two so that it looks like tab 7

    combined.jpgproducts.jpgcustomers.jpg

    Your help would be appreciated.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    Instead of screenshots, please attach a sample workbook with expected output for better understanding


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    Sample workbook..xlsx

    Hi Sixthsense,

    Please see the workbook attached. I did it manually for this example, but there are over 900 customers.

  4. #4
    Registered User
    Join Date
    06-29-2011
    Location
    MUMBAI
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    85

    Re: Appling a range of data to a range of individual cells

    This can be done with a macro

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    Try this code...

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    Thanks, however I'm not that advanced a user to know what to do with this code. Is there a simpler way, or can you explain?

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    I have attached your sample file with Macro Code for your reference.

    Refer the below link to know how to insert VBA code in Module
    http://www.contextures.com/xlvba01.html
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    Thank you, that worked.

    My next problem is that I have combined this information with sales history and now there is duplication. I don't seem to be able to delete the duplicated lines that have a zero value. The program seems to randomly select a line and delete it whether there is sales history attached to it or not.

    How would I remove duplicated lines and keep the lines with a value in it.

    Please see attached.Sample workbook..xlsx

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    Try this in Duplicate file.

    Select Column-A & Column-B and Data>>Remove Duplicates>>Ok...

  10. #10
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    Tried that before, it removes the duplicates in those two columns, however it does not remove the remaining information in each line along with the duplicates. All that happens is that Column A&B shortens and mis-aligns the data to the right.

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    Oopss... Just select the whole range of data and in Remove duplicates Give Tick for Column-A & B alone which will do the task perfectly.

    Please check and confirm

  12. #12
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    Ha Ha, yes I've tried that too. If you look at the top of the sample, next to Annual total there is the number "274". That counts all the value in the Annual total column. As soon as you do it as you suggest above, the number drops to "257", meaning that it is deleting rows that have values in them, and I need that data to remain and the duplicates that are empty to be deleted instead.

  13. #13
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    Insert a new column in Column-C

    In C2 Cell
    Please Login or Register  to view this content.
    Drag it down...

    Copy and paste the column-C formula as values using paste special.

    Now Apply filter for column-C and select "Select&Delete" and delete the entire row...

  14. #14
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    I just get the words "ReduiredData" in each column

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Appling a range of data to a range of individual cells

    Refer the attached file for details
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    05-06-2013
    Location
    Cape Town
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Appling a range of data to a range of individual cells

    Thanks, found the problem. It was in the way I sorted the info. It is tracking now.

    Thank you very much for all your help. You're a legend!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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