+ Reply to Thread
Results 1 to 9 of 9

Help With Re-Ordering/Re-Naming Cells

  1. #1
    Registered User
    Join Date
    08-07-2019
    Location
    usa
    MS-Off Ver
    2013
    Posts
    13

    Help With Re-Ordering/Re-Naming Cells

    Hello all,

    I'm looking for some help on a particular issue, as I'm a novice VBA user. If you reference the photo, when I run the "Set up for next stage" macro, all those cells marked "Yes" in columns E and M are cleared and sent to the bottom of the sheet and stored. So in this case, I will be left with column B starting with "5-2" as the first ticket in that silo. What I would like to do is when I run the "Set up next stage" macro, at the end of the macro I would like to change "5-2" to "5-1" and re-number all the subsequent tickets in that silo, up to a max of "5-10".

    Any help with this would be appreciated as I haven't been able to find what I'm looking for in the forum.
    Attached Images Attached Images

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Help With Re-Ordering/Re-Naming Cells

    A picture tells a thousand words but a sample workbook is a million times better.

  3. #3
    Registered User
    Join Date
    08-07-2019
    Location
    usa
    MS-Off Ver
    2013
    Posts
    13

    Re: Help With Re-Ordering/Re-Naming Cells

    Bob,

    I understand posting the workbook would be great help, but unfortunately information contained within the workbook is proprietary and I definitely don't want to get myself in trouble! Below is the code that I have written for the "Set up for next stage" macro.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Help With Re-Ordering/Re-Naming Cells

    That's only half th code, what about SortSandx and sortsandonlocationx?

    On a particular point, when you say restart 5-2 at 5-1, in the second set, would that be from 4-1, and if you had two sets now start after n-, would both restart?

  5. #5
    Registered User
    Join Date
    08-07-2019
    Location
    usa
    MS-Off Ver
    2013
    Posts
    13

    Re: Help With Re-Ordering/Re-Naming Cells

    Bob,

    My mistake! I forgot I called those macros within that section of code!

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

    To answer your second question, if no sand is used from silo 4, then the order in silo 4 will not need to be changed. The order of 5-1, 5-2, etc is the order in which the sand truck physically entered the silo, and subsequently the order in which they will be run.

  6. #6
    Registered User
    Join Date
    08-07-2019
    Location
    usa
    MS-Off Ver
    2013
    Posts
    13

    Re: Help With Re-Ordering/Re-Naming Cells

    Is posting a copy of the workbook going to help that much with this issue? I have been researching on how to maybe do it but I can't find anything on the internet anywhere that has been helpful.

  7. #7
    Registered User
    Join Date
    08-07-2019
    Location
    usa
    MS-Off Ver
    2013
    Posts
    13

    Re: Help With Re-Ordering/Re-Naming Cells

    Bumping this up again, hoping for some help soon. I've tried multiple ways of using the sort functions to no avail!

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Help With Re-Ordering/Re-Naming Cells

    Quote Originally Posted by ncf5031 View Post
    I understand posting the workbook would be great help, but unfortunately information contained within the workbook is proprietary and I definitely don't want to get myself in trouble! Below is the code that I have written for the "Set up for next stage" macro.
    You can make a sample workbook with the dummy data.

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  9. #9
    Registered User
    Join Date
    08-07-2019
    Location
    usa
    MS-Off Ver
    2013
    Posts
    13

    Re: Help With Re-Ordering/Re-Naming Cells

    Thank you for the advice!

    I've attached the two workbooks that should be fully functional. If you look at silo 5, one entire ticket was run, and then a partial out of 5-2. On the second workbook, which is just saved and re-named from the first workbook every time, after running the "Set up for next stage" macro, ticket 5-1 is cleared and the order in silo 5 starts out at 5-2. What I'm looking to do is have the "set up next stage" macro change 5-2 to 5-1 and re-name all the subsequent tickets in that silo in numerical order (5-1,5-2, etc.) When this happens however, the weights and BOL# have to move together. So 5-2 now becomes 5-1, but it is still BOL# 70917 with a weight of 47,960 lbs. This has to be done for each silo (1-6) and is currently done manually and is a bit cumbersome.

    Whether or not the ticket is marked "Yes" or "Partial" comes from the "Solaris" tab and is dictated by the "x" or "x-y"/"x-z" markings (FYI).
    Last edited by 6StringJazzer; 04-14-2020 at 08:07 PM. Reason: Attachment removed at member's request

+ 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. Adding multiple cells from different colums and then ordering them
    By balexander1978 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2015, 02:29 AM
  2. Ordering Names Based On Values in Other Cells
    By robertwclark in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-24-2014, 08:11 PM
  3. [SOLVED] Ordering cells with formula
    By AdrinBig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2014, 10:05 AM
  4. VBA Ordering User form for Purchase Ordering.
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-10-2014, 01:50 PM
  5. Naming and Un-naming cells
    By wobroberts in forum Excel General
    Replies: 3
    Last Post: 10-13-2010, 08:39 AM
  6. Comparing cells and ordering
    By McKenzie in forum Excel General
    Replies: 5
    Last Post: 07-07-2010, 05:23 AM
  7. Re-ordering cells changes the formula
    By flimper in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-11-2006, 12:50 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