+ Reply to Thread
Results 1 to 5 of 5

Analyze data from a name-date-availability sheet

  1. #1
    Registered User
    Join Date
    07-03-2017
    Location
    Sweden
    MS-Off Ver
    Excel 2012
    Posts
    2

    Post Analyze data from a name-date-availability sheet

    I have an excel sheet that displays dates (ex. 02-07-17) in a horizontal column and a namelist in a vertical column. The created table is filled with a mark "x" whenever a certain name will be present on a specific date. The names will always be present between the first and the last "x".
    What i'd like to do is to write a formula that will give me the name and the first and last date for which the person will be present in a single box.
    This is to eliminate the need to crossreference each date by hand each time.

    Any help would be greatly appreciated!!
    Attached Files Attached Files
    Last edited by SMlLE; 07-03-2017 at 01:09 PM. Reason: Comment feedback

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Analyze data from a name-date-availability sheet

    Code (VBA) or a formula?

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Analyze data from a name-date-availability sheet

    Here is a method that uses an array formula to get the nth column with an "x." You can combine the formula if you wish. I left it as a series of helper columns.

    Count: =COUNTIF(3:3,"x") - gets the number of x's in the row
    First Column: =INDEX($A$2:$L$2,1,MATCH("x",3:3,0)) - uses match / index to find the first date
    nth Column: =INDEX($2:$2,1,LARGE(((3:3="x")*COLUMN(3:3)),COUNTIF(3:3,"x")-C22+1)) - entered as an array formula - similar to the above but gets the nth time the date appears in the column where n is the value in the count column.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Registered User
    Join Date
    07-03-2017
    Location
    Sweden
    MS-Off Ver
    Excel 2012
    Posts
    2
    Thank you! Your code works beautifully! My only concern ia that the formulas responsible for returning the first and last date are responding with the cell-text in question. That is, i'm getting the answer "x" in the programmed cells, which is the correct cell but undistinctable from the rest. Is there an easy way to link this to the date above?

    Many thanks!!

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Analyze data from a name-date-availability sheet

    I am not sure what the question is. Check what you have in the INDEX part of the formula - the first argument (the range) should be "fixed" to the rows containing the date.

    Attached is the spreadsheet with the formulas moved up to the rows with the names. I had to modify the COUNTIF formula to avoid a circular error.
    Attached Files Attached Files

+ 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. availability sheet
    By dougers1 in forum Excel General
    Replies: 4
    Last Post: 09-05-2016, 05:01 PM
  2. [SOLVED] VBA to analyze specific days of the week within date range?
    By hopegriffin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2016, 10:33 PM
  3. Complicated tracking sheet for shift selection and availability
    By ricunger in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2014, 02:37 PM
  4. Maximum data availability time period considering data gaps...
    By hellojasmin12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2013, 05:34 AM
  5. Require Excel formula or workout for date wise booking and availability
    By Jaspreet Singh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-26-2013, 02:44 AM
  6. how to analyze all cells in a column and send each row to designated sheet
    By deputyk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-28-2013, 11:36 AM
  7. How to Analyze Attendance Sheet in Excel 2010
    By 9353PD in forum Excel General
    Replies: 0
    Last Post: 04-22-2013, 10:35 PM

Tags for this Thread

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