+ Reply to Thread
Results 1 to 9 of 9

Selecting specific data on a worksheet and moving it to a table on another worksheet

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Selecting specific data on a worksheet and moving it to a table on another worksheet

    After days of trying to solve this on my own with no luck, I need some help.

    I have 2 worksheets, B and C.

    Worksheet B includes 3 columns. Column A has an item name, Column B has a bin number, and Column C and a quantity number.

    Worksheet C has a table with the y axis being the Item and the x axis being the bin number. I need to select the item names on Worksheet B that have a quantity number greater than 0 and then place the item name with the applicable quantity number in the table on Worksheet C under the applicable Bin number.

    I figured out how to move the item name using the "If" statement, but I would like to make it in to a loop statement since these quantities are updated daily and the number of item names can change.

    Please see my attached Excel sheet.

    Thank you for any help. I've been struggling.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    see sheet 1 and see if that gives you wnat you want?

    edit: you can use the pivot table to filter out the zeros
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-30-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    I update this workbook (actually another workbook that contains these two sheets and that have many many other sheets with buttons and macros) every hour using XML mapping since the list of item names can change and since the quantity for each item can change (the number of bins never change). I played with your workbook, and if I change the quantity number, the pivot table doesn't update itself (and it doesn't look like there are any macros that allows it to update itself), and since it doesn't update itself, it doesn't look like your workbook will work for me. I need macros that will update the table automatically. Let me know if you have any suggestions, and I greatly appreciate your help.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    cant help much with VBA, still learning that myself, but did you try to increase the range that the PT uses, to a way beyond where your data will go down to? it will leave [blank] entries in the PT but you can filter those out

  5. #5
    Registered User
    Join Date
    04-30-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    Can anybody else help me or advise me on what to do?

  6. #6
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    Hi
    I m not sure if this is what you wanted. Check it out..

    Book 1.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  7. #7
    Registered User
    Join Date
    04-30-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    Thank you very much. This is exactly what I need. Can I ask you a a few questions so that I can learn?

    1. what does If, while, and wend mean?
    2. what does For i=3 to rcnt do?



    Thank you again!

  8. #8
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    Hi
    Happy that I could help you..

    1. If statement is to check multiple conditions.
    2. While ... Wend is for looping. Loops till the condition in while becomes false
    3. for i=3 to rcnt means the loop starts from 3 row to the last row which is in rcnt variable.

    I hope this clears your doubts...

  9. #9
    Registered User
    Join Date
    04-30-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Selecting specific data on a worksheet and moving it to a table on another worksheet

    Awesome. Thank you again for the help.

+ 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