+ Reply to Thread
Results 1 to 8 of 8

Create list of Cell Data (column B) based on value in same row, dynamic column.

  1. #1
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Create list of Cell Data (column B) based on value in same row, dynamic column.

    Hi Guys,

    not sure how best to explain this, but here goes. There is an attaached sample worksheet with some made up data, however the formatting is correct.

    On sheet 1, I want to enter a date (which is the monday of that specific week), then I'd like excel to use that date to find a column on 'Mgr Relief', search that column for all instances of the value "Free", and return the staff name/s from column B on Mgr Relief, to sheet 1, in a list form.

    it doesn't need to be pretty, the data on Sheet 1 won't be stored, it will just be used to tell me which staff are available any given week. The end result would be find a vacancy (based on other software), open this spreadsheet, enter a monday-date, receive list of names that are available staff, fill vacancy, close spreadsheet without saving.

    I'm aware I could just use 'hide' or 'filter' or just manually search my existing database (a portion of which is represented by the Mgr Relief sheet) but my actual database is huge, in both staff numbers and number of weeks present, making a manual search a pain, and I have some other formula's going on that don't like hide/filter. Also, I think this would be a much more efficient/elegant solution. Enter date, receive list of available staff, done and dusted.

    Thanks guys!

    Sample Workbook.xlsx

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    hi Christopher. i don't see the value "Free" anywhere. if you are referring to blanks, then maybe this array formula in A3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    what could help next time is for you to key in manually what you are hoping to see. for eg. A3 would be Joe Blogs. A4 is Fake Name. if "Free" is referring to "Mgr", then simply change the part in red:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    An alternative offer ...
    This presumes that in Mgr Relief, "Mgr" marks available relief staff

    In Sheet1,
    Put in A3: ='Mgr Relief'!B2
    Copy down to A8

    In B3:
    =IF(OFFSET('Mgr Relief'!$D$1,ROWS($1:1),MATCH($B$1,'Mgr Relief'!$E$1:$AI$1,0))="Mgr","Free","")
    Copy down to B8.

    If blanks in Mgr Relief mean "Free", use this instead in B3:
    =IF(OFFSET('Mgr Relief'!$D$1,ROWS($1:1),MATCH($B$1,'Mgr Relief'!$E$1:$AI$1,0))="","Free","")
    -------------------------------------------
    Any worth? Wave it, hit the little star at the bottom left of my responses
    Last edited by Max, Singapore; 12-02-2013 at 10:16 PM.

  4. #4
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    I'm about to duck into a meeting but I will try this when i get back.

    my mistake regarding the "free". Normally the formula that populates the roster automatically fills non-manager-roster-codes with 'Free". For the purpose of the sample workbook I deleted the formula (for data sensitivity reasons, it contains url's etc), but forgot to manually enter "free" into the non-Mgr cells. They will normally be populated with the text "free".

    If the formula matters, a data-scrubbed version of it can be seen here:

    http://www.excelforum.com/excel-form...me-values.html

  5. #5
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    Thanks for the help Max! Mgr actually marks a staff member already working in a management role, and so are not available to fill a shift. blank (eventually cells with the value "free" in them) denote staff available to backfill management shifts.

  6. #6
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    Reply to post #5

    Aha ... If that's the case, then use this instead in B3, copied down:
    =IF(OFFSET('Mgr Relief'!$D$1,ROWS($1:1),MATCH($B$1,'Mgr Relief'!$E$1:$AI$1,0))="Free","Free","")
    ----------------------------------
    Any good? Wave it, whack the little star at the bottom left of my responses

  7. #7
    Registered User
    Join Date
    10-16-2013
    Location
    Queensland, Australia
    MS-Off Ver
    MS365, Version 2202
    Posts
    73

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    Thread marked as solved! thanks for the amazing help guys!

    I ended up going with Benishiryo's solution, only because the database is for my upper management, who like things to look simple. They don't care how complicated it is underneath, only that its simple to look at it, and there were less columns on the visible page (front sheet) with Benishiryo's solution.

    For anyone who stumbles across this post in years to come, Max's answer works too guys!

    Thanks for the amazing help as always!

  8. #8
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Create list of Cell Data (column B) based on value in same row, dynamic column.

    .. welcome, and thanks for the feedback

+ 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. [SOLVED] Create Dynamic Column Lookup Reference based on Table Header
    By jeversf in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-22-2013, 12:49 PM
  2. [SOLVED] Create new list based on data from another dynamic list
    By y_not in forum Excel General
    Replies: 6
    Last Post: 01-04-2013, 09:16 AM
  3. Replies: 3
    Last Post: 08-21-2011, 08:22 PM
  4. Create Dynamic Text List From Column
    By VDO in forum Excel General
    Replies: 2
    Last Post: 02-20-2011, 05:12 PM
  5. Replies: 0
    Last Post: 02-28-2006, 09:10 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