+ Reply to Thread
Results 1 to 13 of 13

Display the date in a cell which foods are available based on the selections list

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Display the date in a cell which foods are available based on the selections list

    Hello,
    I have a Foods Menu Table and would like the date is displayed based on the foods are selected from a list.
    Thank you for your help
    Thup
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,642

    Re: Display the date in a cell which foods are available based on the selections list

    I'd use helper row (say row 10) and in A10 array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    copy right, and then in I2 standard formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    note that after removing one of items on Sun Thu will appear and only after removing one of your foods from Thu you will get N/A info.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,642

    Re: Display the date in a cell which foods are available based on the selections list

    PS. If you want to list all days in I2 array formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down

    Just in case (I should wrote this in post #2): Array formula is the one 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.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Display the date in a cell which foods are available based on the selections list

    Kaper and I thought pretty much alike but differently. I used the same array formula {=SUM(COUNTIF(A2:A9,IF($B13:$B20="X",$A13:$A20)))} which counts the matches for the X values in B13:B20 for each of the columns for each day of the week.

    To get all days that match in a horizontal arrangement the following will do that:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter with Ctrl + Shift + Enter

    A vertical display of days matching the criteria can be obtained with this array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter with Ctrl + Shift + Enter
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Display the date in a cell which foods are available based on the selections list

    Thank you Kaper and Newdoverman both ways are working fine. Is there a way to make I2 blank when no food is selected?
    Thank you so much for your help
    Thup
    Last edited by thup_98; 12-12-2015 at 06:22 PM.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Display the date in a cell which foods are available based on the selections list

    This will return a blank if no cells are selected in B13:B20 Enter in I2 and fill down
    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.

  7. #7
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Display the date in a cell which foods are available based on the selections list

    Thank you Newdoverman it works perfectly.
    Happy Holiday Season and a prosperous New Year!
    Thup

  8. #8
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Display the date in a cell which foods are available based on the selections list

    Hi Newdoverman,
    Is there a way to populate the cells below the date with the selected items on another sheet?
    Thup

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Display the date in a cell which foods are available based on the selections list

    This can be done. I moved all the data in the range A12:G20 to Sheet2. As you can see, the formulae still works on Sheet1.

    With the data on Sheet2 the formulae for column I is as follows. Array enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The formula on Sheet2 that makes the count (formerly in row 10 on sheet1)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Display the date in a cell which foods are available based on the selections list

    Hi Ron,
    Sorry I may not make it clear in my question so you may misunderstood me. Is there a way to populate the cells below the date with the selected items on another sheet?
    Please see sheet 3.
    In your formula I did not mark shellfish but it still shows Thu in sheet 1or I may do something wrong. Please help to explain and correct me.
    Thank you,
    Thup
    Attached Files Attached Files

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Display the date in a cell which foods are available based on the selections list

    I don't know where this is going but this should help you with your last request. If this is a work in progress, I suggest that you post the whole problem as solving one thing at a time may not be the best way to achieve your goals. A new thread with that in mind might be in order.

    I created a Data Validation drop down list with the days of the week and also a copy of the listing on Sheet1 onto Sheet2 where I inserted helper columns to count the items that were chosen from the range with the Xs. The helper columns have this formula which is copied into the helper columns for each day of the week (helper columns are to the left of the items for the day)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In the area on Sheet3 where you indicated that you want the results, the data validation drop down list is in Sheet3!A2 where you can choose the day of the week that you are interested in. The formula in A3 is as follows and is filled down the column.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I copied the range from Sheet3 onto Sheet1 in case you wanted a copy there. You can delete the copy that you don't want. Don't delete the range with the calculations on Sheet2 or nothing will work.
    Last edited by newdoverman; 12-13-2015 at 10:14 AM.

  12. #12
    Registered User
    Join Date
    10-19-2012
    Location
    Houston, US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Display the date in a cell which foods are available based on the selections list

    Hi Ron,
    You are brilliant! I understand now. It works. Problem solved.
    Thank you so much for your help.
    Wishing you and yours a very Merry Christmas and a Happy New Year.
    Thup

  13. #13
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Display the date in a cell which foods are available based on the selections list

    Thank you for the feedback.
    Merry Christmas and Happy New Year to you and yours too.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Create list based on selections
    By Audelise in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-11-2015, 01:10 PM
  2. Display unqiue text entries in a list based on date criteria
    By lookingforhelp1 in forum Excel General
    Replies: 7
    Last Post: 08-21-2015, 03:14 PM
  3. [SOLVED] List box selections to transfer to one cell with a comma between selections
    By ArthurWrightis in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-04-2014, 10:51 PM
  4. [SOLVED] Conditional Formatting of List based on selections from Dropdown list
    By FoxyPinkChick in forum Excel General
    Replies: 4
    Last Post: 05-31-2013, 03:32 AM
  5. [SOLVED] fill list based on 2 selections
    By leem in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-18-2012, 04:50 PM
  6. [SOLVED] Update respective cell values in the table based on Multiple Drop Down list selections.
    By nileshpatil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2012, 09:30 AM
  7. [SOLVED] Update respective cell value based on Multiple Drop Down list selections
    By nileshpatil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2012, 08:43 AM

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