How to Extract Number in Cell with Letters

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
Office Version
  1. 365
Platform
  1. Windows
I am using VLOOKUP (trying to at least) to find out how many rooms a hotel suite has. So in A1, for example, is suite 3302F. On another tab with all 1,000 suites numbers, I see 3302F in A23 and in B23, it says "Twr 1B." This is a one-bedroom suite because of the 1 but how do I extract just the number?
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
There's only 1 sheet in that file.

Not to mention you have items like this:
Twr2S#1
T1Sig#5

There are multiple sets of numbers in the data. Which numbers do you want extracted?
 
Last edited:
Upvote 0
The only 4500G in your example has a value of 0 in Column B of Sheet1. 0 doesn't seem like it would be a correct answer.
Also, you haven't answered the question of multiple numbers, for example how many bedrooms does T1Sig#5 (There's a 1 and a 5 in this value) have and why?
 
Last edited:
Upvote 0
According to you sample file :

Enter this formula in sheet1 D3 =IFERROR(MID(A3,4,LEN(A3)-3),"") and drag down to D8473
And this one in sheet Dashboard B3 =(LOOKUP(9^9,0+MID(INDEX(Sheet1!B:B,MATCH(Dashboard!A3,Sheet1!D:D,0)),MIN(FIND({0,1,2,3,4,5,6,7,8,9},INDEX(Sheet1!B:B,MATCH(Dashboard!A3,Sheet1!D:D,0))&1/19)),ROW($1:$16))))
 
Upvote 0
According to you sample file :

Enter this formula in sheet1 D3 =IFERROR(MID(A3,4,LEN(A3)-3),"") and drag down to D8473
And this one in sheet Dashboard B3 =(LOOKUP(9^9,0+MID(INDEX(Sheet1!B:B,MATCH(Dashboard!A3,Sheet1!D:D,0)),MIN(FIND({0,1,2,3,4,5,6,7,8,9},INDEX(Sheet1!B:B,MATCH(Dashboard!A3,Sheet1!D:D,0))&1/19)),ROW($1:$16))))

This is what happens when I followed your notes:

https://app.box.com/s/kf4ib8ki90hjc8tpuxlfxgjjaf8itjay
 
Upvote 0
The only 4500G in your example has a value of 0 in Column B of Sheet1. 0 doesn't seem like it would be a correct answer.
Also, you haven't answered the question of multiple numbers, for example how many bedrooms does T1Sig#5 (There's a 1 and a 5 in this value) have and why?

The suites with 0 next to them are studios (0 bedrooms) so all I need there is the formula to deliver the 0.

Sorry, for T1Sig#5, the number of bedrooms is the 1.
 
Upvote 0
:) This is because your Excel does not automatically calculate ...
On the "Formulas" tab> "Calculation Options"> select "Auto"
 
Upvote 0
Click on B3 then paste the formula into Formula bar and press enter Or double click on B3 paste the formula and press enter .

If it's asking Yes/No click on Yes.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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