+ Reply to Thread
Results 1 to 19 of 19

Index function with different arrays based on cell reference

Hybrid View

SparkyTheElectrician Index function with different... 01-14-2024, 08:54 AM
windknife Re: Index function with... 01-14-2024, 10:44 AM
AliGW Re: Index function with... 01-14-2024, 11:01 AM
SparkyTheElectrician Re: Index function with... 01-14-2024, 02:54 PM
TMS Re: Index function with... 01-14-2024, 11:29 AM
SparkyTheElectrician Re: Index function with... 01-15-2024, 06:03 AM
windknife Re: Index function with... 01-15-2024, 06:24 AM
AliGW Re: Index function with... 01-15-2024, 06:05 AM
SparkyTheElectrician Re: Index function with... 01-15-2024, 09:03 AM
SparkyTheElectrician Re: Index function with... 01-15-2024, 07:56 AM
mallsanta Re: Index function with... 01-15-2024, 08:11 AM
AliGW Re: Index function with... 01-15-2024, 09:25 AM
SparkyTheElectrician Re: Index function with... 01-15-2024, 02:26 PM
DJunqueira Re: Index function with... 01-15-2024, 09:32 AM
TMS Re: Index function with... 01-15-2024, 09:40 AM
TMS Re: Index function with... 01-15-2024, 03:14 PM
SparkyTheElectrician Re: Index function with... 01-15-2024, 08:55 PM
DJunqueira Re: Index function with... 01-15-2024, 09:13 PM
SparkyTheElectrician Re: Index function with... 01-16-2024, 08:26 AM
  1. #1
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Index function with different arrays based on cell reference

    Index Match with Input Based Array.xlsx

    It's me again.

    I am trying to not go through the hassle of writing an If function with in my case 30 different cases and defining 30 different arrays.

    The attached spreadsheet outlines what I am looking for.


    In a nutshell, when using an Index function, the first section to populate is the array. In my case the array is based on the insulation temperature of the cable. I would like to pick a temperature and then assign the appropriate array.

    Then I have a second question in the spreadsheet. I do not know how to outline it in detail. If you could look at it in the attached spreadsheet. Looking to increase values until a function is true.

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,897

    Re: Index function with different arrays based on cell reference

    I guess about Q1.

    B5
    =INDEX(FILTER(Data!A4:E23,Data!A4:A23=B4),B3)

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,486

    Re: Index function with different arrays based on cell reference

    Could you please go back and mark your previous threads as solved.

    Choose Thread Tools from the menu link above and mark them as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    Quote Originally Posted by AliGW View Post
    Could you please go back and mark your previous threads as solved.

    Choose Thread Tools from the menu link above and mark them as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    I am sorry, I forgot. I marked the other one as solved and pushed the rep up.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,188

    Re: Index function with different arrays based on cell reference

    Another way for Q1:
    Formula: copy to clipboard
    =INDEX(INDEX(Data!A4:E23,0,MATCH(B2,Data!A2:E2,0)),B4)
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    Index Match with Input Based Array.xlsx

    I revised the text for the 2nd question I had.
    I could simply look up the next higher gauge and run a check. in 99% of the cases that will work. However, I am in general looking for a formula / function that executes in a loop (incrementing the variable by 1 for each loop) until a criteria is met.

  7. #7
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,897

    Re: Index function with different arrays based on cell reference

    Try this in O6.

    =IF(O4>=B7,"",XLOOKUP(B7,Data!I3:I6,Data!G3:G6,"",1))

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,486

    Re: Index function with different arrays based on cell reference

    This one is still not marked as SOLVED:

    https://www.excelforum.com/excel-for...le-exists.html

  9. #9
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    Quote Originally Posted by AliGW View Post
    This one is still not marked as SOLVED:

    https://www.excelforum.com/excel-for...le-exists.html
    I am really not good at organizational skills or keeping track of things. I marked it as solved now. I hope that works.

  10. #10
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    IF(O4>=B7,"",XLOOKUP(B7,Data!I3:I6,Data!G3:G6,"",1))

    Thank you windknife.

    Please correct my interpretation if I am wrong.

    Look for B7's value in array I3 through I6 and return matching data found in G3 through G6. If none found return an empty space "" but then it also returns the next larger item if none found.

    How is the syntax , "",1) processed in Excel?

  11. #11
    Registered User
    Join Date
    11-17-2023
    Location
    Mumbai
    MS-Off Ver
    Microsoft Office 10
    Posts
    5

    Re: Index function with different arrays based on cell reference

    I understand your concern about avoiding multiple If functions and defining numerous arrays. For your first question about dynamically selecting the array based on the insulation temperature, you can use the INDEX-MATCH combination. Check out the attached spreadsheet for a sample implementation.

    As for your second question about incrementing values until a certain condition is met, I'll take a closer look at the spreadsheet to provide a more detailed response.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,486

    Re: Index function with different arrays based on cell reference

    Thanks.

  13. #13
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    My browser crashed so I am rewriting what I put down already once.
    What is a good hands-on resource to learn Excel formulas? I have another question but I am staring to feel embarrassed. Wanted to give it a try myself.

  14. #14
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Index function with different arrays based on cell reference

    For cell Calculation!B3 you could use one of the following formulas:

    Formula: copy to clipboard
    =SWITCH(B2,"","","60 C",2,"75 C",3,"85 C",4,"90 C",5)


    Formula: copy to clipboard
    =LOOKUP(B2,Temp,COLUMN(Temp))


    And in Calculation!O5

    Formula: copy to clipboard
    =IF(O4>=B7,O2,"Increase Size")
    Attached Files Attached Files

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,188

    Re: Index function with different arrays based on cell reference

    Thanks for the rep.

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,188

    Re: Index function with different arrays based on cell reference

    Well, you probably need to narrow the requirement a bit as there are hundreds of functions.

    See: https://bettersolutions.com/excel/fu...-functions.htm

    And: https://bettersolutions.com/excel/fu...plete-list.htm

    If I need reminding of the syntax of a function, I usually just Google it. There are lots of sites that provide worked examples (and, of course, Microsoft’s own pages).

    Excel itself also prompts you for the parameters to a function . . . but you do need to know what you want to do.

  17. #17
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    I mostly consolidate engineering tables. Meaning, I need anything that can look up arrays, rows, columns, solve equations by increasing specific values by 1 until the equation is true. (if that is even possible).

    Functions that can create tables. For example, instead of installing one big cable, you can install (2) cable of type A, or 3 of type B or 4 of Type C

  18. #18
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: Index function with different arrays based on cell reference

    Quote Originally Posted by SparkyTheElectrician View Post
    I mostly consolidate engineering tables. Meaning, I need anything that can look up arrays, rows, columns, solve equations by increasing specific values by 1 until the equation is true. (if that is even possible).
    For that learn about Solver in Excel.

    Click here for a vide about Solver.

  19. #19
    Registered User
    Join Date
    12-16-2023
    Location
    USA
    MS-Off Ver
    365
    Posts
    27

    Re: Index function with different arrays based on cell reference

    I tried it myself and got half solved but I believe, I am overthinking the other half.

    I attached a spreadsheet. In the example shown the letter found by the formula should be C which is 75A

    Tried multiple formulas. My issue is finding something that can assign a dynamic array. Tried a Vlookup but since some Amp settings may apply to multiple breakers, I will not receive an exact match. For example, the settings 300A is in F11, G7 and H4.

    Tried an Index Match Match. In this case, I can find the associated column / array but then I struggle with the row.



    Find Setting.xlsx

+ 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] INDEX function array reference from another cell
    By RaHor81 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2016, 05:42 PM
  2. [SOLVED] INDEX and reference of several arrays
    By FrederiqueE in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-09-2016, 03:50 PM
  3. Index Function to reference cell 2 columns and
    By Stressed_Daniel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-04-2015, 04:30 AM
  4. Problem with reference to multiple arrays in INDEX/MATCH combo
    By tnuis in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-24-2013, 08:10 PM
  5. Problems with reference to multiple arrays using VLOOKUP / INDEX-MATCH
    By tnuis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-24-2013, 07:21 AM
  6. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  7. Obtaining cell reference from index function
    By MH UK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2006, 10:00 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