Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need help with index/match exchange formula

Posted on 2011-02-17
4
320 Views
Last Modified: 2012-06-27
We have two spreadsheets on our company's network.  One is used by the sales department to record order information.  Another is used by the engineering department to coordinate builds.

In the engineering spreadsheet, there is an INDEX/MATCH formula that would look up the order number in the sales spreadsheet, and return the promised testing date.  If it could not find the order number, it would return a "-".  The problem is that sometimes the sales department will enter multiple orders for a single customer on a line if they're placed and scheduled for testing on the same day.  The index/match formula was not picking those up properly.  

I changed to formula a bit to include wildcards on either side of the order number so that it would simply check to see if the order number was present inside the cell at all.  Now, unfortunately, the formula returns the date except when the cell contains JUST the order number (IE, if searching for order number 12345, the formula will return the date if it finds "12345 & 12346" in the cell, but not if it finds just "12345" alone).

This is the formula:

=IF(ISBLANK(B2),"-",IF(ISNA(INDEX('\\YDS\public\Robot\[Current Master.xls]Schedule'!$A$1:$J$200,MATCH("*"&B2&"*",'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$65536,0),1)),"-",INDEX('\\YDS\public\Robot\[Current Master.xls]Schedule'!$A$1:$J$200,MATCH("*"&B2&"*",'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$65536,0),1)))

If anyone can give me some hints, that would be great.
0
Comment
Question by:Jason_Place
4 Comments
 
LVL 6

Expert Comment

by:KnutsonBM
ID: 34917777
could you post a copy of the spreadsheets by any chance?
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 200 total points
ID: 34918056
Hello Jason,

If the result should be a date then try this version. It tries to MATCH C2 both with and without wildcards (precedence given to without)

=LOOKUP(99^9,IF({1,0},0,INDEX('\\YDS\public\Robot\[Current Master.xls]Schedule'!$A$1:$A$200,LOOKUP(99^9,MATCH(IF({1,0},"*"&C2&"*",C2),'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$200,0)))))

If there is no match or B2 is blank the formula should return a zero, format the formula cell with this custom format

m/d/yyyy;;-

which will format the zeroes to display as dashes

regards, barry
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 300 total points
ID: 34918075
I think your wildcards are converting to text so it won't match a stored number. Try:

=IF(ISBLANK(B2),"-",IF(ISNA(MATCH(B2,'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$65536,0)),IF(ISNA(MATCH("*"&B2&"*",'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$65536,0)),"-",INDEX('\\YDS\public\Robot\[Current Master.xls]Schedule'!$A$1:$J$200,MATCH("*"&B2&"*",'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$65536,0),1)),INDEX('\\YDS\public\Robot\[Current Master.xls]Schedule'!$A$1:$J$200,MATCH(B2,'\\YDS\public\Robot\[Current Master.xls]Schedule'!$I$1:$I$65536,0),1))

Hopefully I got the commas in the right place!
0
 
LVL 1

Author Closing Comment

by:Jason_Place
ID: 34918141
Good calls.  Both formulas worked.  Ended up using the second one so I wouldn't have to worry about format.  Thanks guys!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Web Query 1 19
Combine like values in a graph excel 2016 7 30
MS Excel Formula Help 3 32
Save and close already open Excel file using VBscript 9 45
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question