+ Reply to Thread
Results 1 to 13 of 13

Extract Data from Matrix

  1. #1
    Registered User
    Join Date
    06-22-2008
    Posts
    12

    Extract Data from Matrix

    Greetings:

    I'm sorry to just jump in with my problem, but I'm not even sure what to call what I'm trying to do, so just let me ask...

    I'm running a small messenger company and I've got a geographic area divided into five zones: 1,2,3E,3W,& 4

    Deliveries within 1 zone will be charged for one zone.
    Deliveries from Zone 1 to Zone 2 will be charged for 2 zones. Etc.

    I've got a list of zones in my From column and also in my To column.

    I need to write a formula that will give my customers the Zones Charged in a seperate cell.

    I learned how to do something like this back in school, but don't even know what to call it anymore. Maybe it's some kind of comples IF function.

    I'd sure appreciate anyone who can help me figure out how to do this.

    FREE Deliveries to anyone in Long Beach, CA to the winner!!!

    I'm attaching a chart to show what I need done.

    Thanx in advance.

    Michael Doughty
    M&M Messenger
    Attached Images Attached Images
    Last edited by rylo; 06-22-2008 at 09:12 PM. Reason: Revise Post Title

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Say your matrix as shown is in the range G1:L6. In B2 you have your From Zone, and in C2 you have your To Zone.

    The formula: =INDEX(G1:L6,MATCH(B2,G1:G6),MATCH(C2,G1:L1))
    should bring back the result from your matrix.

    HTH

    rylo

  3. #3
    Registered User
    Join Date
    06-22-2008
    Posts
    12

    Thumbs up Thank You!

    YES! That was it! Thanx much!

    Woe

  4. #4
    Registered User
    Join Date
    06-22-2008
    Posts
    12

    Why can't I repeat this?

    I tried to repeat what (I thought) I'd learned, but this time it's not working.

    In cell C36 I have a dropdown list of possible services, Direct, Standard, Same Day, and Overnight.

    In cell C37 I have the results of the above matrix calculation 1,2,3, or 4.

    It seems like to me that the matrix (See attached) I'm employing should render the resulting prices from the table, but it's not working.

    What am I doing wrong?

    Wish I'd paid more attention while in school!!

    Woebegone
    Attached Images Attached Images

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Can you please attach a copy of the workbook rather than a picture. Much easier to see what is going on and we don't have to reenter formulas / data.


    rylo

  6. #6
    Registered User
    Join Date
    06-22-2008
    Posts
    12
    Here it is:

    Thanx.

    Woe
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    The formula in C37 should be =INDEX(AH1:AM6,MATCH(B24,AH1:AH6),MATCH(F24,AH1:AH6))
    to bring back the number of zones.

    Where is the formula for the price supposed to go? C38??? And is it supposed to be based on the results from C36 and C37?

    rylo

  8. #8
    Registered User
    Join Date
    06-22-2008
    Posts
    12
    Yes, C38, for now at least. Yes C37, Service Type and C38, Zones charged needs to compute the price subtotal in C38

    Woe

  9. #9
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    C38: =INDEX(AH8:AL12,MATCH(C36,AH8:AH12,0),MATCH(C37,AH8:AL8,0))

    For your example items of Standard and 4 zones, the result is N/A.

    rylo
    Last edited by rylo; 06-27-2008 at 09:33 PM.

  10. #10
    Registered User
    Join Date
    06-22-2008
    Posts
    12

    Talking Thanx Again!

    Perfect! I really appreciate all your help. If you're ever in Long Beach, I owe you a beer!

    Thanx Again,

    Woe

  11. #11
    Registered User
    Join Date
    06-22-2008
    Posts
    12

    Question Extract Data from Matrix... a small problem.

    The solution rylo gave me for this problem looked like it was working, but I've discovered a problem.

    The formula seems to extract the right data from the matrix except when C36="Direct", then it returns "N/A". It should be returning data from AH9;AL9. The matrix table is correct, and the formula works in every other instance. Perhaps I'm missing something in the formula.

    Could someone take a look and see what it is I've screwed up?

    Thanx in advance

    Woe
    Attached Files Attached Files

  12. #12
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Extract Data from Matrix

    Please Login or Register  to view this content.
    Edit the space out of AD2 and the formula should work properly.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  13. #13
    Registered User
    Join Date
    06-22-2008
    Posts
    12
    Yup...

    Now I feel silly. Thanx!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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