+ Reply to Thread
Results 1 to 26 of 26

Values based on three inputs

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Values based on three inputs

    Trying to look up values based on three inputs:

    Attached is the file:

    Month Input, Column Input and Network Input are changeable based on user input, I am trying to get the desired output based on selection from A20, B20, C20 into cells G20, G21, G22 from row number 2 and corresponding values in H20, H21, H22 from the corresponding row based on the selection.

    I have populated an example in the attached file.

    Any help will be greatly appreciated. Thanks in advance.
    Attached Files Attached Files
    Last edited by sha123; 01-28-2014 at 04:19 PM. Reason: Need formula without using "Row" function, please.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,748

    Re: Values based on three inputs

    Try this. It assumes that the combination will be unique. If the same combination occurs more than once then you will get answers that don't make any sense.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    G20:

    =INDEX($C$2:$H$2,MATCH($C$20,C$3:F$3,0)+ROW(A1)-1)

    and copy downwards

    H20:

    =SUMPRODUCT(($A$4:$A$16=$A$20)*($B$4:$B$16=$B$20)*($C$2:$H$2=$G20)*($C$4:$H$16))

    and copy downwards
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Thanks daddodil !

  5. #5
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    Glad I was able to help out. Thanks for the feedback.

  6. #6
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Hi daffodil,

    Can we do it without using "Row" function in G20, please. Thanks in advance.

    G20:

    =INDEX($C$2:$H$2,MATCH($C$20,C$3:F$3,0)+ROW(A1)-1)
    Last edited by sha123; 01-28-2014 at 04:22 PM.

  7. #7
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Thank you.

  8. #8
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    Sure. They're just an efficient way to write 0, 1, 2.

    G20:

    =INDEX($C$2:$H$2,MATCH($C$20,C$3:F$3,0))

    G21:

    =INDEX($C$2:$H$2,MATCH($C$20,C$3:F$3,0)+1)

    G22:

    =INDEX($C$2:$H$2,MATCH($C$20,C$3:F$3,0)+2)

  9. #9
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    One more issue now:

    I just have some more Columns added to the excel sheet and I am not getting the desired output.

    Example: Cells G22 and H22 should be blank when "SA" or "PUC" or "OTH" are inserted in cell C20, since they only have two respective columns but all others have three respective columns.

    Can you please help, attached is the excel sheet with full data. Can you please take a look. Thanks again.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Really appreciate your earlier response!

  11. #11
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    Sorry, I was grinding away on a Crystal Report. Those things are terrible. (and a little awesome)

    G20:

    =INDEX($C$2:$S$2,MATCH($C$20,C$3:S$3,0))

    G21:

    =INDEX($C$2:$T$2,MATCH($C$20,C$3:T$3,0)+1)

    G22:

    =IF(INDEX($C$3:$U$3,MATCH($C$20,C$3:U$3,0)+2)=C20,INDEX($C$2:$U$2,MATCH($C$20,C$3:U$3,0)+2),"")

    H20:

    =IF(G20="","",SUMPRODUCT(($A$4:$A$16=$A$20)*($B$4:$B$16=$B$20)*($C$2:$T$2=$G20)*($C$4:$T$16)))

    and copied down

    for shareq.xls
    Last edited by daffodil11; 01-28-2014 at 06:22 PM.

  12. #12
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Thank you so much daffodil..

  13. #13
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    No problem. I always enjoy a good challenge.

  14. #14
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    One more Issue now:

    I am unable to display the result if I use Index, Match, Sumproduct.

    Can it be done using Vlookup or SUMIF or IF or Concat by any chance. Any help will be greatly appreciated. Thanks in advance.
    Last edited by sha123; 01-30-2014 at 02:15 PM.

  15. #15
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    Okay, to accommodate your request things get a little trickier.

    First, I to insert a column in C:

    =A4&B4 and copied down

    Next I had to make a table to VLOOKUP the subcodes.

    Then I added a VLOOKUP table to match subcode to column number.

    Lastly, I had to add a column at the end of " - " so that when no subcode is found it doesn't make error.

    shareq makes me work so hard today.xls

  16. #16
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    I also have to lookup the Network and Column Input as well, i.e cells A20, B20 and C20 and need to get the appropriate row into the output field. Can you please check. Thanks.
    Last edited by sha123; 01-30-2014 at 04:10 PM.

  17. #17
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    Triumph at last!

    Thanks for making me work for it.

    Don't forget to mark the thread as "Solved" under the Thread Options at the top.

  18. #18
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    I just checked with changing the values in A20, B20, C20. I am not getting the right values in the output columns?? Can you please check!!

  19. #19
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    The only thing I found missing was to change each formula in I20:I22 from ..)) to ),0) so that it correctly produces an error when the data isn't found.

    I can't find any other issues. Can you attach the copy you're using and highlight the error?
    Last edited by daffodil11; 01-30-2014 at 06:17 PM.

  20. #20
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    I am getting the 5th row into the output for some reason. Can you please check. Thanks.

  21. #21
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    What are you entering into A20:C20?

  22. #22
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Enter any value ARR, AHT...etc. Its populating the fifth row from the column selected, dont know why?? Can you please take a look at the values that are in the output fields.

  23. #23
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    That's corrected with what I suggested a few posts ago. It was missing the ,0) at the end.

    I20:

    =VLOOKUP($A$20&$B$20,$C$4:$V$16,VLOOKUP($H20,$Q$21:$R$39,2,0),0)

    I21:

    =VLOOKUP($A$20&$B$20,$C$4:$V$16,VLOOKUP($H21,$Q$21:$R$39,2,0),0)

    I22:

    =VLOOKUP($A$20&$B$20,$C$4:$V$16,VLOOKUP($H22,$Q$21:$R$39,2,0),0)

  24. #24
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Excellent!! Thanks.

  25. #25
    Registered User
    Join Date
    01-17-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Values based on three inputs

    Thanks for all your formulas.

    I have marked this thread as solved, but I have a new issue now:

    Need to look up all the values that were posted previously and getting the relevant value based on the month number as well. Can you please take a look, might be a simple one for you!!

    Attached is the spreadsheet, I need to populate the output cells with the value from the corresponding month number(as well) from the table with all the values corresponding to C19, D19, E19. Please take a look. Thanks in advance.
    Attached Files Attached Files

  26. #26
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Values based on three inputs

    You have 2 month outputs. They can't both be true at the same time.

    I can't specify Month Input 1, and then at the same time Month Input 12, 11, 10 , 9..

+ 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. [SOLVED] Values based on two inputs
    By sha123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-24-2014, 01:02 PM
  2. Calculating values based on other inputs.
    By Dapos1993 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-07-2013, 08:00 PM
  3. [SOLVED] macro which copies all column values based on specific string inputs
    By buntalan80 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-12-2012, 03:08 PM
  4. Excel 2007 : Finding a value based on 2 inputs
    By maxcavalli in forum Excel General
    Replies: 4
    Last Post: 08-10-2011, 12:47 PM
  5. Find value in table based on two inputs
    By AMDRIT in forum Excel General
    Replies: 3
    Last Post: 12-30-2005, 12:50 PM

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