+ Reply to Thread
Results 1 to 10 of 10

Formula that returns the "following value" of a dropdown list

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    10

    Formula that returns the "following value" of a dropdown list

    Hi all,

    I'm facing the following problem:

    in cell A1, there's a drop-down list, where only one of a list of values can be selected (January, February, March, [...], December).

    I'd like to put a formula in cell B1, so that B1 = The following value in the list, in relation to the value selected in A1.

    That is: if the user selects "March", for example, in the drop-down list in A1, cell B1 will automatically display the value "April".

    How can I do this with a formula?

    Many thanks in advance
    Bruno

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that returns the "following value" of a dropdown list

    Try

    =TEXT((A1&1)+31,"mmmm")

  3. #3
    Registered User
    Join Date
    04-12-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Formula that returns the "following value" of a dropdown list

    hmm... this doesn't work...
    I'm not sure the "+31" makes sense here, since the values in the drop-down list are not necessarily recognized as months by Excel

    (but thx anyway)

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that returns the "following value" of a dropdown list

    So what values ARE in the dropdown?
    My suggestion was based on your dropdown being the 12 months, January February March etc..

  5. #5
    Registered User
    Join Date
    04-12-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Formula that returns the "following value" of a dropdown list

    It's the 12 months, in this case.
    Don't know why it doesn't work then...

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that returns the "following value" of a dropdown list

    Define "Doesn't work"

    do you get an error? what error?
    do you get the wrong result? What result DID you get, and what result were you expecting..and why?
    What value was in A1 when this error or wrong result occurred?

  7. #7
    Registered User
    Join Date
    04-12-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Formula that returns the "following value" of a dropdown list

    The drop-down list in A1 contains exactly the following values: {Jan; Feb; Mar; Apr; May; Jun; Jul; Aug; Sep; Oct; Nov; Dec}. And the error I get when inserting the exact formula you suggested (I only switched the comma for a semicolon) is "#VALUE!"

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that returns the "following value" of a dropdown list

    I think I know what's going on...

    If you're using a different regional setting..
    If you enter a date in a cell, are months spelled January February March etc...
    Or do you have some other set of names for the months ?


    Also, is this the ultimate goal on months?, or might there be some other use for this as well?
    Are the values manually typed in the data validation, or are they referring to a range on a sheet? What is that range?

  9. #9
    Registered User
    Join Date
    04-12-2013
    Location
    São Paulo, Brazil
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Formula that returns the "following value" of a dropdown list

    When I type a date, the months are spelled January, February, March, etc [English (US)]. The values are typed manually in the data validation.

    In this case, the ultimate goal is just months... But it would be certainly useful to learn how to apply this generally for data validating lists...

    Do you know of any ways to set the formula to B1= the following value in the list L {a, b, c, ..., }, in relation to the value in A1 ?

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Formula that returns the "following value" of a dropdown list

    If you months are the US english months, then I don't see why it's not working.
    Can you post a sample book?


    I can't think of anyway to do it strictly based off the data validation list.
    Especially if that list is just manually typed in.

    If you put that list in a range of cells, say D1:D12 or whatever, then in the datavalidation use List =$D$1:$D$12

    Then probably something can be done based off the list in D1:D12

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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