ANSWERS: 4
  • Okay, so, let me see if I understand what you're trying to do. Are you trying to say that if one particular cell has any number between 1-13, then you want it to refer to cell 13 from columns A-M? There are other ways of getting that same result other than to use IF/THEN/ELSE statements in Excel. But if you must use this, you could try breaking up the statements into two separate cells. Let's just assume that you're using q21 for this (and q22 is blank) Then you could in q21, type =if(q20=1,a13,if(q20=2,b13...if(q20=8,h13,q22)))))))) Then in q22, type =if(q20=9,i13,if(q20=10,j13,...if(q20=13,m13,"")))))))) Afterwards, you may want to hide q22. There may be another way to do this, but I think this should solve your problem.
  • In Excel 2007 you can use more nested IFs, but in prior versions there is a limit. There are a few ways to accomplish this task without using IFs, here's one: Since you are using simple numbers, you can use the CHOOSE() function which takes a number from 1 to 29, then picks that result from the given list. =CHOOSE(Q20, $A$13, $B$13, $C$13) If Q20 = 2, the result is $B$13
  • After your eighth IF argument put a + symbol and you can add another eight. A shorter formula using Lookup might do the trick: =LOOKUP(Q20,$A$13:$M$13) If you want to suppress #N/A errors use: =IF(ISNA(LOOKUP(Q20,$A$13:$M$13)),"",LOOKUP(Q20,$A$13:$M$13))
  • Here's a way to do what you're asking. It's not "nice", but it helps to illustrate another way, and some other functions you may want to learn: Let's assume that the integers 1 - 20 are arrayed in B17:B37. Let's also assume that the column labels A - T are arrayed in D16:W16. (Of course, you can put these arrays anywhere you want to -- and they don't have to be vertical and horizontal just because I made them that way -- or do this in another way entirely. I'm just using these to illustrate answers to your particular Q.) Then, =INDIRECT( INDEX(D16:AC16,1,MATCH( Q20, B17:B37, FALSE)) & "13") Will return values from A13 to W13 based on the values of Q20, when those are integers between 1 and 20. What's happening, from the inside out, is: 1. MATCH( Q20, B17:B37, FALSE) is matching the value in Q20 for an exact match among the integers in your vertical array B17:B37. 2. INDEX(D16:AC16,1,MATCH( Q20, B17:B37, FALSE)) is finding the "index value" of the matched number, and locating that between A and W in the horizontal letter array. 3. The final INDIRECT combines the literal letter found from the INDEX and the final constant "13" to return the value of the cell at (Letter, 13). If you learn the Index, VLookup (and HLookup) functions, you can probably avoid this entire mess, actually.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy