+ Reply to Thread
Results 1 to 17 of 17

Picking from a list

  1. #1
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Picking from a list

    I have column with scheduled times in it ( J1- 09:00, J2 - 10:15, J3 - 12:00, J4 - 15:00 )
    in F1 I have a formatted time entered, I need the time in F1 to pick the next higher number from Jlist and populate it in G1, any ideas I am stumped ?( and new )
    Attached Files Attached Files
    Last edited by Krat; 07-21-2016 at 08:08 PM.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Picking from a list

    Welcome to the forum.

    Can you attach a sample workbook. 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.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    Try this array formula**:

    =IF(F1>=J4,"None",MIN(IF(J1:J4>F1,J1:J4)))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    EDIT: Format as Time
    Last edited by Tony Valko; 07-21-2016 at 05:26 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    I am trying to send over sample, as soon as i figure out why its no letting me I will
    thansk for the advanced tip, but the file is not showing uo when I click on the attach tab, Ill get it out there soon

  5. #5
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    Not sure what I missed but using this formula I was only able to get it to say "NONE", did I miss something ?

  6. #6
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Picking from a list

    Yeah attaching a file is a bit clunky.

    Go to advanced.
    Scroll down to MANAGE ATTACHMENTS.
    Choose the file to upload.
    Hit OK to choose it.
    THEN hit UPLOAD on the right to finally upload it to the post.
    THEN hit CLOSE window.

    Then post the message.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    Quote Originally Posted by Krat View Post
    Not sure what I missed but using this formula I was only able to get it to say "NONE", did I miss something ?
    Did you enter the formula as an array formula?

    Array formulas are entered differently than a regular formula. After you type in a regular formula you hit the ENTER key. With an array formula you must use a combination of keys. Those keys are the CTRL key, the SHIFT key and the ENTER key. That is, hold down both the CTRL key and the SHIFT key then hit the ENTER key.

    When done properly Excel will enclose the formula in squiggly brackets { }. You can't just type these brackets in, you must use the key combo to produce them. Also, anytime you edit an array formula it must be re-entered as an array using the key combo.

    Here's a sample file that demonstrates this.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    I added teh array and that did not seam to help , I finnaly figuered out how to attach so there is a sample on my origanl post, but I forgot to add other times to column J , so just add 5 more times down the colum in J and then the goal is to have the time in F1 select from the list in J and populate in G1

    and thanks for not givin up on me yet : )

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    The formula in the sample file was:

    =IF(F1>=J1,"None",MIN(IF(J1:J5>F1,J1:J5)))

    When I added these times to column J:

    J2: 10:15
    J3: 12:00
    J4: 15:00

    And adjusted the formula to include those additional times:

    =IF(F1>=J4,"None",MIN(IF(J1:J4>F1,J1:J4)))

    The formula returned the correct result of 12:00.

    It might be more intuitive to write the formula like this:

    =IF(F1=MAX(F1,J1:J4),"None",MIN(IF(J1:J4>F1,J1:J4)))

    Still array entered.

  10. #10
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    Excellent, that did it, thank you, I can now start my weekend ; )
    Attached Files Attached Files
    Last edited by Krat; 07-22-2016 at 10:28 AM.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    Good deal. Thanks for the feedback!

  12. #12
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    Sorry, looks like I may have spoken to soon, I attached the file with the new formula and it works right up until it crossed 00:00 or midnight, meaning when you enter the time into A3 the formula works in F3 just perfect until you enter the time of 20:00 to 23:59 in A3, durning those times F3 returns with 00:00, when it should return 09:00, any ideas?

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    It's because 23:15 + 1:00 = 1+12:15. In other words, it spans past midnight into the next day so the true value is 1d 12:15 but the cell is only displaying 0:15.

    Also, you have 2400 (2 thousand 4 hundred) entered in J1. In Excel there is no time of day as 24:00 (or 2400).

  14. #14
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    Ok good point, i changed the 24:00 to 00:00 and it returns"none", so I tried setting it to 00:01 and same result "none"?

  15. #15
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    Try changing the formulas in B3:E3.

    B3: =MOD(A3+TIME(0,15,0),1)
    C3: =MOD(B3+TIME(1,0,0),1)
    D3: =MOD(C3+TIME(2,0,0),1)
    E3: =MOD(D3+TIME(1,0,0),1)

  16. #16
    Registered User
    Join Date
    07-21-2016
    Location
    Texas
    MS-Off Ver
    14.6.6
    Posts
    8

    Re: Picking from a list

    You guys are frickin geniuses, thanks a bunch, that did it and now I can say, IF FRIDAY ; )

    Really thanks allot for all the help

  17. #17
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Picking from a list

    You're welcome!

+ 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. Picking from a list
    By jkahm in forum Excel General
    Replies: 2
    Last Post: 02-26-2015, 10:55 AM
  2. VBA - randomly picking from a list?
    By jsneak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-19-2013, 10:13 AM
  3. [SOLVED] Picking out data from a list
    By stockgoblin42 in forum Excel General
    Replies: 1
    Last Post: 11-05-2011, 05:17 PM
  4. Replies: 5
    Last Post: 08-01-2011, 03:22 PM
  5. Picking up a particular list
    By khank in forum Excel General
    Replies: 4
    Last Post: 02-17-2011, 05:41 PM
  6. Picking numbers from a list
    By Melanie Clarke in forum Excel General
    Replies: 34
    Last Post: 06-23-2010, 08:38 PM
  7. Picking Values from a list
    By babygoode in forum Excel Formulas & Functions
    Replies: 80
    Last Post: 09-07-2005, 12:05 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