+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21

Thread: Using IF/VLOOKUP formulas INSIDE Data Validation

  1. #16
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,608

    Re: Using IF/VLOOKUP formulas INSIDE Data Validation

    I think you just lost me... E9, M9? Fast_Attack FOS, Thunder Hammers?

    Please use the Varro Tigurius option when explaining and give exact details of what is supposed to happen, where and why?
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  2. #17
    Registered User
    Join Date
    09-01-2011
    Location
    Blythe, AZ
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Using IF/VLOOKUP formulas INSIDE Data Validation

    Oh I'm sorry, didn't mean to confuse you. Sadly, I can't use Varro Tigurius for this example.

    Under the Options/Upgrades there are two columns. If you select Fast_Attack under the Force Organization slot then Vanguard_Veteran_Squad under the unit squad, almost every cell in both columns will be filled. In order to properly total all of the points for the upgrades, I would need to add both adjacent columns together (ones in the same row)

    So in the first cel of the first column, you can select Additional Units X1-5 and a point total will populate in the points column. In the first cel of the second column, you can select Thunder Hammer X1-10 and each of those selections has a certain number of points its worth. To keep things simple, I would just like each row to add together the totals and put it in the points column. For example, in the Vanguard_Veteran_Squad, if you select Additional Units X5 and Thunder Hammer X10, the total points for that row should equal 400.

  3. #18
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,608

    Re: Using IF/VLOOKUP formulas INSIDE Data Validation

    I think I understand now
    Try:

    =IF(AND(E9="",M9=""),"",SUMIF(OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,1),E9,OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,2))+SUMIF(OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,1),M9,OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,2)))
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  4. #19
    Registered User
    Join Date
    09-01-2011
    Location
    Blythe, AZ
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Using IF/VLOOKUP formulas INSIDE Data Validation

    It works! +1 to science.

    Thank you very much for all of your help. I truly appreciate you spending the time to help me out with my problem.

  5. #20
    Registered User
    Join Date
    09-01-2011
    Location
    Blythe, AZ
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Using IF/VLOOKUP formulas INSIDE Data Validation

    You know what, I found something kind of wonky with the point totals for the option upgrades.

    If you select HQ in the Force Organization Slot and then pick Space_Marine_Chapter_Master or Space_Marine_Captain, the point cost for the first 2 upgrade slots are doubled for some odd reason. It doesn't happen with any other unit (that (I've seen thus far).

    For example, when you select Relic Blade in the first option drop down list it should be 30 points, not 60.

    I've attached the latest version of this document.
    Attached Files Attached Files

  6. #21
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,608

    Re: Using IF/VLOOKUP formulas INSIDE Data Validation

    It is because those 2 options have identical column details duplicated in their respective table in the OptionsV2 tab.

    If the respective numbers are going to be the same for each category as it looks like in the OptionsV2 tab, then we can change the SUMIF to AVERAGEIF... so that it divides the sum by the count, in essence, giving you the correct expected end result.

    put this formula in Q9:

    =IF(AND(E9="",M9=""),"",IF(E9="",0,AVERAGEIF(OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,1),E9,OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,2)))+IF(M9="",0,AVERAGEIF(OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,1),M9,OFFSET(INDIRECT(SUBSTITUTE($A$3," ","_")),0,2))))
    copied down.

    If the numbers are not the same, then it will get more complicated and you will need to fully separate the column E options and column M options within the OptionsV2 sheet into 2 separate groups for each Unit Name.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0