Find first number in column using match/index function

maldonadocj

Board Regular
Joined
Oct 19, 2004
Messages
103
Hello,
Can someone pls. assist me with providing a formula, ideally using the index/match functions, to locate the first absolute (may have positive or negative values) number in a column? I have added snapshots of how the data would look on the two sheets they are currently located on.

Thank you in advance.

Sheet 1

IDValue
12345678ANULL
12345678A100
12345678A150
12345678B200
<colgroup><col width="118" style="width: 89pt; mso-width-source: userset; mso-width-alt: 4315;"> <col width="64" style="width: 48pt;"> <tbody> </tbody>

Sheet2

IDExpected Result
12345678A100
<colgroup><col width="93" style="width: 70pt; mso-width-source: userset; mso-width-alt: 3401;"> <col width="152" style="width: 114pt; mso-width-source: userset; mso-width-alt: 5558;"> <tbody> </tbody>
 
The only thing I've been able to come up with is to add a helper column to extract the numbers from the value column.
The formula in D2 to extract numbers comes from this link.

https://www.youtube.com/watch?v=bqsvOygpQWc
Excel Workbook
ABCDE
1IDValueDateHelper
212345678ANULL1/15/20130
312345678ALow100a1/25/2013100
412345678A1501/26/2013150
512345678B2001/27/2013200
612345678B100H21/30/20131002
7
812345678A1001/25/2013
9
Sheet
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You're welcome. Glad they worked for you. Thanks for the feedback.
 
Upvote 0
Hello AhoyNC,

Was wondering if you may assist with a similar inquiry. I am trying to solve for a numeric value (cell C6) given a text id (cell A6) and a date(cell B6). Pls. see example below. It is likely a derivation of one of the formulas you provided me previously but I have done several iterations of it to no avail.

Thank you in advance.


Table 1
ABC
1IDValueDate
212345678A1005/15/2014
312345678A1025/9/2014
412345678B1036/1/2014
5
612345678A5/15/2014100
<colgroup><col width="64" style="width: 48pt;"> <col width="91" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3328;"> <col width="64" style="width: 48pt;"> <col width="90" style="width: 68pt; mso-width-source: userset; mso-width-alt: 3291;"> <tbody> </tbody>
 
Upvote 0
Try:

An array formula that must be entered with
Excel Workbook
ABCD
1IDValueDate
212345678A1005/15/2014
312345678A1025/9/2014
412345678B1036/1/2014
5
612345678A5/15/2014100
7
CTRL-SHIFT-ENTER.
 
Upvote 0
It appears this also works


Excel 2010
ABC
1IDValueDate
212345678A1005/15/2014
312345678A10205/09/2014
412345678B10306/01/2014
5
612345678A5/15/2014100
Sheet4
Cell Formulas
RangeFormula
C6=SUMPRODUCT(($A$2:$A$4=$A$6)*($C$2:$C$4=$B$6)*($B$2:$B$4))
 
Upvote 0
Try:

An array formula that must be entered with CTRL-SHIFT-ENTER.

{=INDEX($B$2:$B$4,MATCH($A$6&$B$6,$A$2:$A$4&$C$2:$C$4,0))}

Concatenation without a delimiter can be risky, in particular when numbers are involved. Try rather:

{=INDEX($B$2:$B$4,MATCH($A6,IF($C$2:$C$4=$C6,$A$2:$A$4),0))}
 
Upvote 0
It appears this also works

Excel 2010
ABC
1IDValueDate
212345678A1005/15/2014
312345678A10205/09/2014
412345678B10306/01/2014
5
612345678A5/15/2014100

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Worksheet Formulas
CellFormula
C6=SUMPRODUCT(($A$2:$A$4=$A$6)*($C$2:$C$4=$B$6)*($B$2:$B$4))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

I guess my solution would be for another question :) Not the one posed here

Sorry about that
 
Upvote 0
Aladin,
Thanks for the feedback on the formula I used. It's always good to learn better and more efficient ways to handle these issues.
 
Upvote 0
Hello All,

Thank you very much for your incredible insight and assistance. Unfortunately, the formulas provided did not work due to a time stamp issue. The problem is due to differing times. Using the prior example, cell B6 has a date of 5/15/2014 and a time stamp of 12:00:00 PM whereas cell C2 has a date of 5/15/2014 but a time stamp of 3:00:00 PM. Is it possible to enhance the formulas to ignore the time stamp and only use the date as the reference point?

Best regards,
maldonadocj
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,665
Members
449,091
Latest member
peppernaut

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