+ Reply to Thread
Results 1 to 10 of 10

INDEX/MATCH formula looking in 2 columns and 1 row

  1. #1
    Registered User
    Join Date
    11-22-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    18

    INDEX/MATCH formula looking in 2 columns and 1 row

    Hi everyone,

    I need a formula that searches one column for the name of a customer, a 2nd column for the delivery point, then a row for the rate that the delivery was done at, and finally equal the cell that matches all of these. I tried addapting a formula that I used to look up stock that we store, but it didn't have to look in rows and columns and I'm wondering if that's why this isn't working. Here's what I've got so far;

    =IFERROR(INDEX(Customers!H:K,MATCH(1,(Customers!D:D=$J4)*(Customers!F:F=$O4)*(Customers!1:1=$Z4),0)),0)

    This produces a message telling me that 'Excel ran out of resources while attempting to calculate one of more formulas. As a result, these formulas cannot be evaluated.'

    I'm hoping someone can point out that I've just made a daft mistake as I really need to get this to work! Please let me know if you need any more info.

    Many thanks in advance,

    Ben

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Difficult to say without seeing the workbook but it looks like you're evaluating an array formula there which is probably resulting in the message you get.

    Have you tried creating a helper column which concatenates the customer name, delivery point and rate, then using a simple vlookup (or INDEX MATCH combination) to find the relevant row using the helper column.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    11-22-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Hi Richard,

    I looked at using vlookup for the stock and it wasn't going to work out. My problem is that I'm working with quite a large amount of data that updates from a separate workbook and I have to make it easy for me to make the links in the first place. At the moment I can basically just put the first cell in for a customer and drag it, but if I already have to do this for each customer and if I have to add more info for me to fill in or change the layout now it's going to become much more work for me. I'm making a sample of the Customer worksheet now but haven't uploaded a screenshot to a website in many years, what's the best way for me to do it or would it be easier to upload a sample of the workbook?

    Many thanks,

    Ben

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Hi,

    Check the FAQ tab at the top of the forum. Go to the third pane 'Board FAQ' and choose the Reading and Posting messages then Attachments and Images.

    Don't upload a screenshot, we require the workbook itself or at least a representative sample. Add some notes which describe (with reference to specific cells, ranges, or sheets) what you expect to happen.

  5. #5
    Registered User
    Join Date
    11-22-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Found it, but can you tell me what the file size limit is as it doesn't say. I have a habit of making rather large excel files and need to know how much to cut it down by.

    Many thanks,

    Ben

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Hi,

    Don't know offhand but I think it's quite large.
    All we need is a representative sample anyway so just delete non relevant rows. If it won't upload just remove some rows until it will.

  7. #7
    Registered User
    Join Date
    11-22-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Right, I've stripped the file down to it's skeleton and left enough so that it still functions.

    I've tried to fit some notes in as best as I can. The only worksheets involved with this problem are Temp (11) and Customers, the others I've kept so that the drop downs still work and there's a week to test with.

    Let me know if you need any explanations or further info.

    Many thanks,

    Ben
    Attached Files Attached Files

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Specifically what values do you expect to see in K18 & S18 and why?

    A =VLOOKUP(J18,Customers!$C$1:$D$176,2,FALSE) in K18 will return the value "_1" but it's not clear if this is what you want.

    M18 & O18 contain validation drop downs. Again it's not clear whether you are wanting to replace these with a formula or not. If you want the M18 'Macclesfield' value to be returned, how should the system determine that it should use the E126 cell on the customers sheet rather than E127, E128 etc. which are all also associated with Ben.

    Similarly if O18 should be Stoke on Trent, what determines this? i.e. what's the relationship between Ben and Stoke on Trent.

    My gut feeling is that the layout is not particularly usable for analysis and it may well be that a fundamental reorganisation might simplify things.

  9. #9
    Registered User
    Join Date
    11-22-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Thanks for your reply Richard, but I think you've misunderstood what I'm trying accomplish.

    The value "_1" will already be entered on the page in the customer column of the calendar as this is the code that allows the data validation in 'From' and 'To' to choose the appropriate job list according to the customer.

    When my company receives a job, me or one of my colleagues will firstly enter the customer, then choose the collection and delivery points and finally at what rate the job has been priced at; this all works exactly how I want it to (accept that the drop down values have to be chose, it doesn't accept it if you type them for some reason). All I need is an equation that finds the correct price, at the specified rate, for the specified destination, for the specified customer.

    K18 has an arrow pointing to J18 which is just showing you where a customer gets selected. S18 is the price and this is what I want to calculate, based on the values I've mentioned above, from the grid of information that is on the Customers worksheet.

    As I mentioned above, M18 and O18 both work perfectly (near enough) and they have only been filled in and pointed out as I want them to be involved in the parameters of the formula held within S18.

    The formula that I posted earlier was based on, as I mentioned, one that I used in our stock login sheet that firstly looks for the name of the stock item, then the date specified and finally what storage facility it is being stored in, and it works beautifully. The only difference to the formula I'm trying to put together now is that I need it to not only search down columns for the first row that matches both the customer do and the destination (this information being held within columns D and F in the Customers worksheet) but search row 1 for the matching rate and equal the value in the single cell that matches all of these criteria.

    Let me know if you now understand what I'm trying to achieve a bit better and whether you need more information.

    Many thanks,

    Ben
    Last edited by Ben.SFM; 06-27-2012 at 10:08 AM.

  10. #10
    Registered User
    Join Date
    11-22-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: INDEX/MATCH formula looking in 2 columns and 1 row

    Does any one else have ideas or suggestions for a solution to this? Or perhaps know of a thread with a similar problem that I could look at? Unfortunately I'm very limitted with the time I have to spend on this as I've got a lot of other jobs to do that are more urgent.

    Many thanks,

    Ben

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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