INDEX/MATCH with Return Numbers Only

Morey

New Member
Joined
Sep 24, 2018
Messages
33
The following INDEX/MATCH formula works but, I would like the return to be just the numbers (no text). Help modifying formula would be appreciated.

Code:
 =IFERROR(INDEX('SDC TRIRIGA'!$C$1:$C$15000,MATCH(A2,'SDC TRIRIGA'!$A$1:$A$15000,0)),"")
Current Return:
REQ-1187706

<tbody>
</tbody>
Would like this Return:
1187706

<tbody>
</tbody>
Regards,

Morey
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,050
Office Version
365
Platform
Windows
Will all the returns end in a 7 digit number?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,050
Office Version
365
Platform
Windows
In that case try
=IFERROR(RIGHT(INDEX('SDC TRIRIGA'!$C$1:$C$15000,MATCH(A2,'SDC TRIRIGA'!$A$1:$A$15000,0)),7)*1,"")
This will convert the text into a number. If you want to keep it as text, delete the part in red
 

Morey

New Member
Joined
Sep 24, 2018
Messages
33
In that case try
=IFERROR(RIGHT(INDEX('SDC TRIRIGA'!$C$1:$C$15000,MATCH(A2,'SDC TRIRIGA'!$A$1:$A$15000,0)),7)*1,"")
This will convert the text into a number. If you want to keep it as text, delete the part in red
Fluff,

That did it. Noticed, that the data has a space after the last digit (1187706 <----space found here). To account for this ",7)*1" was edited to ",8)*1". Any way to remove this excessive space after the last digit?

Thanks,

Morey
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,050
Office Version
365
Platform
Windows
The *1 should get rid of the space (assuming it's a normal space)
 

Morey

New Member
Joined
Sep 24, 2018
Messages
33
The *1 should get rid of the space (assuming it's a normal space)
Fluff,

After further investigation, you are correct the final return value is indeed space less. Thanks for all the help.



Regards,

Morey
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,050
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Forum statistics

Threads
1,081,676
Messages
5,360,441
Members
400,586
Latest member
Minty

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top