+ Reply to Thread
Results 1 to 9 of 9

moving areas around a spreadsheet

  1. #1
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    moving areas around a spreadsheet

    If anyone can have a look at this problem and see if there is a possible solution it would be appreciated. Attached you will see a spreadsheet which basically has an extract of a bay set-up for a warehouse(bincodes). The warehouse basically runs alpha/num based on the first 4 digits of the bin-codes (the last 3 digits are the levels and positions within the and are irrelevant).
    This runs fine for picking but on the filling side for technical reasons there are various areas which come under certain teams and so ideally they need moving to different positons on the spreadsheet. I have code to select the area. In the code below it will select the area highlighted on the spreadsheet.
    Please Login or Register  to view this content.
    but what I am not sure about is how to move them around the spreadsheet so that excel can work with them.
    Below is how the teams need to look with the red text(See teams 7&8) being the areas needing to be moved
    .
    TEAM 1
    AD41 TO AH62
    TEAM 2
    AJ01 TO AK62
    TEAM 3
    AL01 TO AL75
    AM01 TO AM71
    TEAM 4
    AN01TO AP71
    TEAM 5
    AR01 TO AR71
    AS01 TO AS71
    TEAM 6
    AT23 TO AT71
    AU23 TO AT71
    TEAM 7
    AV38 TO AX99
    AR72 TO AR99
    AL76 TO AL99

    TEAM 8
    AT01 TO AT19
    AU01 TO AU19

    AY19 TO AY 23
    AZ01 TO AZ22
    AC01 TO AD40
    The end objective is hopefully A) to use on various forms as a print area set-up B) Probaly a much more difficult task is to hopefullly be able to use a pivot table to analyse the numbers for each team.
    If any of the above is either unclear or if any of it is impossible please let me know. Please note that the speadsheet is an extract which is why the ranges I state cover some locations not on the spreadsheet.
    The other option I can think of is to extract the various bincodes to separate sheets for each team, which is perfectly adequate but I would need to be told how to do this as I haven't attempted this or anything similar before
    Attached Files Attached Files
    Last edited by WasWodge; 12-15-2010 at 11:15 PM. Reason: Other option

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: moving areas around a spreadsheet

    Hi

    Can you update your example above to match the data in your example file, and also update your example file with the expected output (say in sheet3), and then explain why / how that data gets moved to the output position.

    rylo

  3. #3
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: moving areas around a spreadsheet

    Hi Rylo, I have updated the data and included the desired results in the original post. "START" is the original data and the "TEAM" sheets the results. I have laid it out this way as the more I think about it I feel it is better all round to have the teams in separate sheets. The why is based based on the manufacturer,product weight,type of product and building restrictions. The how is what I am struggling with, it has to be range specific but hopefully putting the data in separate sheets will make life easier for people with more VBA skills to work out. Let me know if I haven,t made everything clear

  4. #4
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: moving areas around a spreadsheet

    Apologises if Rylo hasn't been on line since I was last on line but in case my previous posts haven't been clear as I see it now what I need to know is

    A) How to create a new worksheet in the same workbook with a new specific name
    B) How to copy contents from the original worksheet into the new sheet.

    I know how to get the range I need to copy (See post #1) so that isn't the problem. Once I know how to do this for 1 range I will reapeat the task for the other ranges. It will be ugly code but once I have it working I will probaly come back and ask if there is some way of tidying up the code.

    Thankyou for your patience

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: moving areas around a spreadsheet

    Hi

    See how this goes. You will have to complete the case statement selections for the different selections and ranges.

    Please Login or Register  to view this content.
    rylo
    Last edited by rylo; 12-07-2010 at 08:28 PM. Reason: Expanded code

  6. #6
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: moving areas around a spreadsheet

    Cheers Rylo, First apologises for not getting back sooner but had to go away for a couple of days. I have tried it on my version of the attached file and it seems to be working perfectly. I will try it on a proper version of the complete file at work tomorrow, Must admit I didn't expect you to write the full macro for all the teams so that is much appreciated.
    I think I am understanding most of the code but if you get a chance can you explain how the line below is working. In particular what is the array part refencing i.e. I don't understand where the "H1, H2" is coming from or what it is refencing sorry if that makes me sound dumb but still learning.
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: moving areas around a spreadsheet

    G'day

    I'm using the advanced filter to select and move the relevant data to the correct sheet. As the filter is being used, it must have a header row. Your data doesn't have one, so I've inserted a row, put in a dummy header (H1, H2 as in Header1, Header2), done the filtering, then removed the header rows.

    Make sense?

    rylo

  8. #8
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: moving areas around a spreadsheet

    Yes, makes perfect sense. As I use advanced filter a lot at work I should have realised what it was (Said I was in Dumb mode).I will test the code tomorrow on a full sheet and if as expected I get no problems I will mark the post as solved. Much thanks for your time spent.

  9. #9
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: moving areas around a spreadsheet

    Dumb mode
    - gees, I can sure relate to that. Do it at least 100 times a day!!!

    rylo

+ 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