Excel: Need Help

Discussion in 'Computer Science & Culture' started by Thoreau, Nov 15, 2011.

Thread Status:
Not open for further replies.
  1. Thoreau Valued Senior Member

    Messages:
    3,380
    I'm somewhat unfamiliar with the functions and commands in MS Excel and need some help here.

    I need to figure out how I can set it up to where, in a table on the right, if I type in the a number in the range of the X-axis (Say the number is 45), then I also type in the letter of the Y-axis (for this example, Y=C), then I need it to calculate the cooralating number of the two (in this case, $35). (This is for work so these numbers are purely just an example. When I can calculate out how to format it, these numbers will be replaced with others)

    See image>>>

    ***EDIT*** Image removed. See image in Post #19
     
    Last edited: Nov 15, 2011
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Dywyddyr Penguinaciously duckalicious. Valued Senior Member

    Messages:
    19,252
    Just to be picky...
    At least 1 but less than 10
    at least 11 but less than 20

    Where does 10 go?
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Thoreau Valued Senior Member

    Messages:
    3,380
    Oops. Well, just use your imagination. lol
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. Chipz Banned Banned

    Messages:
    838
    In Excel 2010 it can be done with a swing table. In previous versions you might need to use VB macros.
     
  8. Thoreau Valued Senior Member

    Messages:
    3,380
    Um.... ok. Imagine you're teaching a 5 year old how to do this. lol I don't know what either of those are.
     
  9. Enmos Valued Senior Member

    Messages:
    43,184
    MZ, what do you mean "45"? There is no number 45 on the x-axis. Or do you mean that the formula has to figure out which row to go to?

    You could use something crude like this:

    =if(or(isblank(X);isblank(Y));"";index(RANGE;left(X-1;1)+1;code(Y)-64))
     
    Last edited: Nov 15, 2011
  10. Thoreau Valued Senior Member

    Messages:
    3,380
    Not only does the formula have to figure out which row (x-axis) but also what the end number is by also using the specified column (y-axis).

    So, I want a table that gives the option to TYPE in a number (say, 45), and have it automatically tie to the appropriate range. Furthermore, I also want to type in the Y-axis identifier (A,B or C etc) and then have it automatically populate the $$ number - the cross of the two axis'.

    So, if I type in 45 in field #1 and then C in field #2, I want field #3 to give me the cross of the two - in this case $35
     
  11. Enmos Valued Senior Member

    Messages:
    43,184
    The formula above will do that. It is a bit crude though.

    Edit: the "+1" part should by modified depending on on which row in excel you range begins. If it starts on row 2 then type +1, 3 type +2, etc.

    Oh, X and Y are cell references of course.
     
    Last edited: Nov 15, 2011
  12. Thoreau Valued Senior Member

    Messages:
    3,380
    Not working.
     
  13. Thoreau Valued Senior Member

    Messages:
    3,380
    ok Let me try. brb
     
  14. Enmos Valued Senior Member

    Messages:
    43,184
    Hang on I'll post a pic. The formula is kind of specific so it may not work on your table.
     
  15. Thoreau Valued Senior Member

    Messages:
    3,380
    Still on luck. It's not accepting the formula.
     
  16. Enmos Valued Senior Member

    Messages:
    43,184
  17. Enmos Valued Senior Member

    Messages:
    43,184
    Hmm.. if the real numbers you are going to use are not going to be 1-10, 11-20, etc this formula is not going to work of course.

    Do you see the formula's tab? Click that, then click insert function. It's pretty easy to figure out by yourself.
     
  18. Enmos Valued Senior Member

    Messages:
    43,184
    That was obviously bullshit.. lol No idea why I told you that

    Please Register or Log in to view the hidden image!



    MZ, if you just give me the real numbers etc I will make it for you.
     
  19. adoucette Caca Occurs Valued Senior Member

    Messages:
    7,829
    Enmos, not sure I understand the logic of this: =LEFT(S2-1,1)+1

    How is that supposed to pick out the correct row based on the value entered in S2, when the values of S2 are between 2 and 9?
     
  20. Enmos Valued Senior Member

    Messages:
    43,184
    Ok, this one is universal as long as you keep categories of ten (1-10, 11-20, etc):

    INDEX(C2:J18;TRUNC((L6-1)/10)+1;MATCH(M6;C1:J1))

    C2:J18 is your range.
    C1:J1 is the range of the "Y-axis" (A, B, C, etc).
    L6 is the cell where you input the X-value.
    M6 is the cell where you input the Y-value.
    Change any of these if yours are different.
     
  21. Enmos Valued Senior Member

    Messages:
    43,184
    I was not sure what the error was in his example. In fact, I'm still not sure.
    The way I see it S2's range is 1-10 or 1-9.
     
  22. Thoreau Valued Senior Member

    Messages:
    3,380
    Here, let's try this...

    Please Register or Log in to view the hidden image!



    I want to be able to type any number in that Qty field, any color in the Color field and have it give me the $ amount.
     
  23. Enmos Valued Senior Member

    Messages:
    43,184
    Ok, for categories of 9 it's this:

    INDEX(C2:J18;IF(L6/9>TRUNC(L6/9);TRUNC(L6/9)+1;TRUNC(L6/9));MATCH(M6;C1:J1))
     
Thread Status:
Not open for further replies.

Share This Page