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.
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

ShuStar

Board Regular
Joined
Sep 9, 2015
Messages
89
Office Version
  1. 2010
Platform
  1. Windows
Try:
=vlookup ("*"&cell B, table, column number of table, 0)
 

ShuStar

Board Regular
Joined
Sep 9, 2015
Messages
89
Office Version
  1. 2010
Platform
  1. Windows
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:

SoFlo24

New Member
Joined
Aug 6, 2020
Messages
5
Office Version
  1. 365
Platform
  1. Windows
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.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
52,960
Office Version
  1. 365
Platform
  1. Windows
How about
=INDEX(Sheet1!$B$2:$B$1000,MATCH("* "&A2,Sheet1!$A$2:$A$100,0))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,564
Messages
5,596,875
Members
414,106
Latest member
Tigretto

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
Top