Getting answer even when all cells are blank

IFERROR(INDEX({Req Main Sort Summary}, MATCH($[LIB ID]@row, {LIB ID}, 0), MATCH([Script Name]$1, {Req Main Sort Header})), "")
Two sheets -
First is the primary sort with Script Numbers, Names and other key information
Second is the primary Test Build / Tracker sheet where End2End tests are built from the sort sheet.
There are 300+ tests to build up integrated scenarios from. The second sheet also tracks defects, status and other critical test metrics.
There should only be data in a Script name field if there is data in the LIB ID field, However, unless I clear the field of the formula there is a random (last script) filled down as far as the formula is filled down. This is very confusing to the user as this needs to be dynamic.
The Defect Index and Match calculation does something similar, though it is going out and simply pulling the first thing it finds.
Any suggestions as to what I am doing wrong would be most helpful.
Best Answer
-
In the second match, the search type is not specified so it will use the default type, which is 1 (see below). Does changing this to 0 help?
IFERROR(INDEX({Req Main Sort Summary}, MATCH($[LIB ID]@row, {LIB ID}, 0), MATCH([Script Name]$1, {Req Main Sort Header},0)), "")
For the optionalΒ search_typeΒ argument:
1:Β (The default value) Finds the largest value less than or equal toΒ search_valueΒ (requires that the range be sorted in ascending order)
0:Β Finds the first exact match (the range may be unordered)
-1:Β Finds the smallest value greater than or equal toΒ search_valueΒ (requires that the range be sorted in descending order)
Answers
-
In the second match, the search type is not specified so it will use the default type, which is 1 (see below). Does changing this to 0 help?
IFERROR(INDEX({Req Main Sort Summary}, MATCH($[LIB ID]@row, {LIB ID}, 0), MATCH([Script Name]$1, {Req Main Sort Header},0)), "")
For the optionalΒ search_typeΒ argument:
1:Β (The default value) Finds the largest value less than or equal toΒ search_valueΒ (requires that the range be sorted in ascending order)
0:Β Finds the first exact match (the range may be unordered)
-1:Β Finds the smallest value greater than or equal toΒ search_valueΒ (requires that the range be sorted in descending order)
-
That is exactly what was missing. Thank you
-
That is exactly what was missing, thank you. Solved the problem in both formula's.
-
Great! I'm glad you have that sorted.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 207 Use Cases
- 517 Announcements
- 5.5K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 83 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!