Extracting Certain Data within a cell

jenrique.cerda

Board Regular
Joined
Sep 22, 2006
Messages
53
Hi, I´ve got a problem here.

I have a column where cells are classified as No-35 2N ,etc. The NO- is fixed and the only thing that is variable here is the weeknumber in this case the 35 is the week number. The 2N stands for second notice, if there is a third notice I would put No-35 3N etc. If there is no notice I would put No-35 or if I notified another week it would be No-36...

I have a column with lots of week numbers; 2N, 3N, 4N, 5N, etc. Is there a way in which I can extract only the weeknumber from the cell???

In a No-37 3N I´d like to have only the 37 as a value.

In advance for your help thanks.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

How's this:

=MID(A1,4,2)

Hope that helps,

Smitty
 

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,022
Weeks less than ten...formatted as<ul>[*]No-01, No-02 or [*]No-1, No-2?[/list]Heya, Smitty!
 

jenrique.cerda

Board Regular
Joined
Sep 22, 2006
Messages
53
Excellent, thanks to you all guys down from Monterrey, Mexico.
 

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,022
Favor lea me pregunta porque puede ser que falla para las primeras nueve semanas si el formato no es de dos dígitos.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,351
Office Version
  1. 365
Platform
  1. Windows
You can use practically (well exactly really) the same formula in VBA as Smitty has posted for the worksheet.

How exactly do you want this to work in VBA?

By the way another non-formula option might be to use Data>Text to columns... with - and space as delimiters.
 

jenrique.cerda

Board Regular
Joined
Sep 22, 2006
Messages
53
Ok I understand you now, and the first weeks are in the two digit forms too Greg.

Thanks agian and have a nice weekend.
 

Forum statistics

Threads
1,171,829
Messages
5,877,790
Members
433,287
Latest member
amna_shahbaz

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