+ Reply to Thread
Results 1 to 5 of 5

Need to shorten Data Validation formula in order to fit into formula field

Hybrid View

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    2

    Need to shorten Data Validation formula in order to fit into formula field

    I have a series of 15 cells that return letter values depending on an IF statement. I need a data validation to be created depending on the values returned in these 15 cells. Here is a preview of the full formula I need to fit into my data validation list.

    =IF($F$68="AA",INDIRECT($F$68),IF($F$69="A",INDIRECT($F$69),IF($F$70="B",INDIRECT($F$70),IF($F$71="D",INDIRECT($F$71),IF($F$72="E",INDIRECT($F$72),IF($F$73="F",INDIRECT($F$73),IF($F$74="G",INDIRECT($F$74),IF($F$75="AB",INDIRECT($F$75), IF($F$76="I",INDIRECT($F$76), IF($F$77="J",INDIRECT($F$77), IF($F$78="AC",INDIRECT($F$78), IF($F$79="L",INDIRECT($F$79), IF($F$80="AG",INDIRECT($F$80), IF($F$81="AI",INDIRECT($F$81), IF($F$82="AK",INDIRECT($F$82),$I$73)))))))))))))))

    If it helps, I have also combined those 15 cells into 3 cells based on a longer formula which each cell is capable of returning 5 different letter values. Thinking in a different way, maybe a data validation formula returning values based on the results of those three cells.

    Please let me know if it is possible to shrink my above formula into one that would work for a data validation list.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need to shorten Data Validation formula in order to fit into formula field

    Does that formula work? If the value of F68 is "AA" then INDIRECT("AA") should return a #REF error. What is it you're trying to do?

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Need to shorten Data Validation formula in order to fit into formula field

    I have a cell range named AA, so it will return the values in that name range AA. The formula does work. I am trying to have a data validation list in cell C36 return a list of values based on a name range provided in a group of 15 cells. The formula works as long as I am within the 255 character limit, which allows me to enter a total of 8 formulas but I have 15 to enter the formula field.

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need to shorten Data Validation formula in order to fit into formula field

    Can you post an example workbook?

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need to shorten Data Validation formula in order to fit into formula field

    Just messing around with this, if the option is the cell containing the values you're looking for or being blank then you could go with:

    =IFERROR(INDIRECT(OFFSET($F$68,0,MATCH(TRUE, INDEX($F$68:$F$82<>"",0),0)-1)),$I$73)

    If the cells could contain values other than the one you're looking for it gets a bit more complex, but does that get you started?

+ 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