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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

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,014
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

ADVERTISEMENT

Excellent, thanks to you all guys down from Monterrey, Mexico.
 

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,014

ADVERTISEMENT

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,300
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,136,263
Messages
5,674,710
Members
419,521
Latest member
Jasonnie

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