Share via

How to sort a spreadsheet with dropdown menus so that the data follows the new sort?

Anonymous
2023-09-28T14:54:51+00:00

FYI I've been searching solutions to this issue all over the internet for the last hour in various forumns and how-to sites and tutorials on YouTube, I've tried all given solutions (which aren't many, they all seem to repeat each other), still not working.

THE SETUP:

I have a spreadsheet "Sheet 1" with a few different date columns: "Start", "Wave", "Due".

  • Each row in the "Start" column contains one date manually entered of when a campaign started.
  • Each row in the "Wave" column has a date that's either manually entered or has a date from a dropdown menu - all data for all dropdown menus is listed on "Sheet 2". This is because some campaigns only have one wave, ie one launch date, but some campaigns span months and have different waves throughout those months, so I need a dropdown to select which wave we're currently on, ie when is the upcoming new set of assets launching for that campaign.
  • Each row in the "Due" column is a formula based on Wave data minus 30 days (ex: if Wave data is 9/30/2023, then Due result would be 9/1/2023).

On Sheet 2, I have Column A with campaign names that correspond to campaign names in Sheet 1, then Column B with the dates needed.

  • Example: A1: product launch, B2: 9/1/2023, B3: 9/15/2023, B4: 10/1/2023
    • The source for data validation in the Wave column on Sheet 1 for the "product launch" row would then be ='Sheet 2'!$B$2:$B$4

Since the data in the Wave column changes based on picking new dates from the various dropdowns, that will change the data in the Due column, and whenever data is changed in the Wave column, I want to do a new sort in the Due column so that dates are sorted oldest to newest.

THE ISSUE:

Whenever I do a new sort for the Due column (or any column for that matter), the dropdowns and all their data in Wave column stay where they are, they do not move with the rest of the row. It may look like it at first because after the sort the date in the Wave row is what was last chosen, but if I were to click on that cell to change the date to a new date, it would either not be clickable because prior to the sort there was no dropdown there, or it would show the wrong set of dates because prior to the sort a different dropdown menu was there. If I click on the cell in Wave column where the row used to be, I can see the original set of dates that should be associated with that row.

WHAT I'VE TRIED:

  1. Tried converting the date data for each campaign in Sheet 2 to a table.
  2. Tried adding in columns to Sheet 1 for the dates so that each row has the dates it needs hidden.
    • example: If Wave is Column A, and Due is Column B, I added in 3 columns between the 2 so that Wave = A, Date 1 = B, Date 2 = C, Date 3 = D, Due = E. Then in my data validation source, a dropdown for A2 would be $B$2:$D$2.
  3. Tried taking off the "$" from the source in data validation in the #2 example above, thinking maybe that was keeping the dropdown data rooted to those cells.
  4. Tried typing out the dates in the source box of data validation window.
    • example: instead of source looking like "$B$2:$D$2" it looks like "9/1/2023, 9/15/2023, 10/1/2023"

Please help! I'm at wits end with something that seems like it should be so simple, but it's become a huge issue and time waster.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Rich~M 20,370 Reputation points Volunteer Moderator
    2023-09-28T16:22:03+00:00

    Hi Adeline. I am an Excel user like you.

    I believe I have sorted out the issue you are having. You are entering different Data Validation lists for each row in your Sheet 1 based on the Project for that row. Then, when the data is sorted, the data will sort, but the Data Validation settings don't move with the sort. Here is a solution.

    You need to set up your Data Validation lists based on Named Ranges that can be referenced based on the project name in that row. When the data is sorted the Data Validation will then look at whatever project name has moved into that row and will find the correct Data Validation for that project.

    1. Set up your Sheet 2 to identify your Named Ranges. Here is a Sample idea:

    Image

    .

    Your Named Range names have to meet certain criteria like no spaces, etc. so I entered the name to use for a named range in Column B shown in yellow next to the Project name. This will be important because we will use a VLOOKUP for the project name to find the appropriate named range for the Data Validation list.

    1. Select all of the cells that will be used for the Named Range. I included ample cells for multiple possible entries. In my example the cells B2:B10 would be named Launch1, B:12:B20 would be named Launch2, and B22:B30 would be named Launch3. To name the range, select those cells and then in the upper corner of the screen where the active cell is shown click in that window and type the new Named Range and the hit Enter. Repeat for the other Named Ranges.

    Note: It is extremely important that the spelling and Case of the Named Range and the name in B1, etc., match or Excel won't be able to find the Named Range later in the process.

    Image

    .

    Now go back to Sheet 1 and select all of the cells in the Wave column that you want to add Data Validation. Open the Data Validation window, Choose List, and in the Source line enter this formula:

    =INDIRECT(VLOOKUP(A2,Sheet2!$A$1:$B$30,2,FALSE))

    .

    Image

    .

    Adjust the formula as needed to the Sheet name and range that matches your sheet 2 data and click OK.

    Image

    .

    Excel will now use the list associated with the Named Range for that project no matter what row the project is in after sorting.

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-09-28T19:34:35+00:00

    HUZZAH!!! This worked perfectly!!! Thank you Rich! You relieved such a headache for me!!

    All the best to you,

    Adaline

    1 person found this answer helpful.
    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more