XMatch Not Returning Expected Result

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
2,779
Office Version
  1. 365
Platform
  1. Windows
I'm a little frustrated with this because I expected to finish an hour ago. So you get my rant.

I have some costs in line with some cells Containing TRUE so I can Use SumIFS to sum the values, but not the summary values for each year. As you can see cell U8 is not TRUE and is a summary column

Now I want to find the first cost in a row that is over zero. I'm using xmatch like this in cell I17:
=XMATCH(0.00001,$I$7:$ET$7*$I$8:$ET$8,1,1)
or
=XMATCH(1e-99,$I$7:$ET$7*$I$8:$ET$8,1,1)
But as you can tell, it returns 17 instead of 12. Cell T7 is definitely a value, not text. Cell T9 shows the same value; it is a formula: =T8*T7

Please take a look

Jeff

ProjectsRegister - Support_4.xlsm
IJKLMNOPQRSTUVWXYZAA
512345678910111213141516171819
6Jan-14Feb-14Mar-14Apr-14May-14Jun-14Jul-14Aug-14Sep-14Oct-14Nov-14Dec-142014Jan-15Feb-15Mar-15Apr-15May-15Jun-15
70.000.000.000.000.000.000.000.000.000.000.006,256,117.536,256,117.530.000.000.0094.000.0036,082.00
8TRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUE0TRUETRUETRUETRUETRUETRUE
9000000000006256117.53000094036082
10
1117
Last EAC
Cell Formulas
RangeFormula
I6:EU6I6=SAPHistoryTbl[[#Headers],[Jan-14]:[2024]]
I9:AA9I9=I8*I7
I11I11=XMATCH(0.00001,$I$7:$ET$7*$I$8:$ET$8,1,1)
Dynamic array formulas.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
It's returning 17 as that is the nearest value to .00001.
How about
Excel Formula:
=TAKE(FILTER(SEQUENCE(,142),$I$7:$ET$7*$I$8:$ET$8>0),,1)
 
Upvote 0
Solution
MrExcelPlayground13.xlsx
IJKLMNOPQRSTUVWXYZAA
512345678910111213141516171819
6
7000000000006256118625611800094036082
8TRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUETRUE0TRUETRUETRUETRUETRUETRUE
9000000000006256118000094036082
10
1117
1212
Sheet25
Cell Formulas
RangeFormula
I9:AA9I9=I8*I7
I11I11=XMATCH(0.00001,$I$7:$ET$7*(--($I$8:$ET$8)),1)
I12I12=MIN(FILTER(SEQUENCE(1,COLUMNS(I7:AA8))*(I7:AA7*I8:AA8>0),SEQUENCE(1,COLUMNS(I7:AA8))*(I7:AA7*I8:AA8>0)>0))
 
Upvote 0
It's returning 17 as that is the nearest value to .00001.
How about
Excel Formula:
=TAKE(FILTER(SEQUENCE(,142),$I$7:$ET$7*$I$8:$ET$8>0),,1)
I haven't worked with TAKE yet, but now it's worth a look. I seen what you did with the sequence to return the series. I removed that and just used the date range above to return the correct date, which was what I wanted the final result to be anyway
=TAKE(FILTER(I6:ET6,$I$7:$ET$7*$I$8:$ET$8>0),,1)

Thank you
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top