[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Need help with index/match exchange formula

Posted on 2011-02-17
4
Medium Priority
?
337 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
[X]
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
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 800 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 1200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

649 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