Pulling a number with Vlookup within a sentence

SoFlo24

New Member
Joined
Aug 6, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I'm trying to pull a number from a sentence using Vlookup. In cell A it has, "Based on Sales Orders 5078857", and cell B I have "34357". Any help would be great.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try:
=vlookup ("*"&cell B, table, column number of table, 0)
 
Upvote 0
Ignore that vlookup.

Once you got the cell with the data, next would be to pull the number only - so question:
-is the number always at the end of the text
-is the number always 7 digits?

If so, use a Right function. If not, explore using MID function.

Example using Right function (based on assumption from above - adapt as needed):
RIGHT((your vlookup), 7)
 
Last edited:
Upvote 0
Unfortunately, it did not work. I'm looking back now and I see that I did not really explain it all that well, sorry about that.


On my first page I have
Based on Sales Orders 5078857 in cell A and 34357 in cell B

On my second page I have just the number 5078857 in A and I would like to pull up 34357 in cell B almost on the second page.

The number is always at the end of a text and no it is not always 7 digits.
 
Upvote 0
How about
=INDEX(Sheet1!$B$2:$B$1000,MATCH("* "&A2,Sheet1!$A$2:$A$100,0))
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,747
Members
448,989
Latest member
mariah3

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