A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formula help



 
 
Thread Tools Display Modes
  #1  
Old March 10th, 2009, 11:51 PM posted to microsoft.public.excel.charting
Steph
external usenet poster
 
Posts: 169
Default Formula help

I have data that looks like this:

S30 1M D C7D
S30 1M D
5W I 4
2W I X AH1

I need a formula that will extract the third group of characters from each
record. The records can be any length and the groups are seperated by
spaces. For example,

From "S30 1M D C7D" I need to extract "D".
From "S30 1M D" I need to extract "D".
From "5W I 4" I need to extract "4".
From "2W I X AH1" I need to extract "X".

Thanks for any help that can be provided.

--
Steph
  #2  
Old March 11th, 2009, 12:46 AM posted to microsoft.public.excel.charting
Steph
external usenet poster
 
Posts: 169
Default Formula help

I apologize. I accidently posted to the wrong group.

--
Steph


"Steph" wrote:

I have data that looks like this:

S30 1M D C7D
S30 1M D
5W I 4
2W I X AH1

I need a formula that will extract the third group of characters from each
record. The records can be any length and the groups are seperated by
spaces. For example,

From "S30 1M D C7D" I need to extract "D".
From "S30 1M D" I need to extract "D".
From "5W I 4" I need to extract "4".
From "2W I X AH1" I need to extract "X".

Thanks for any help that can be provided.

--
Steph

  #3  
Old March 11th, 2009, 08:57 AM posted to microsoft.public.excel.charting
PBezucha
external usenet poster
 
Posts: 72
Default Formula help

Steph,

Still, most simple solution by a UDF:

Function S(Arg As String) As String
S = Split(Arg, " ")(2)
End Function
--
Regards

Petr Bezucha


"Steph" wrote:

I apologize. I accidently posted to the wrong group.

--
Steph


"Steph" wrote:

I have data that looks like this:

S30 1M D C7D
S30 1M D
5W I 4
2W I X AH1

I need a formula that will extract the third group of characters from each
record. The records can be any length and the groups are seperated by
spaces. For example,

From "S30 1M D C7D" I need to extract "D".
From "S30 1M D" I need to extract "D".
From "5W I 4" I need to extract "4".
From "2W I X AH1" I need to extract "X".

Thanks for any help that can be provided.

--
Steph

  #4  
Old March 12th, 2009, 04:57 AM posted to microsoft.public.excel.charting
Shane Devenshire
external usenet poster
 
Posts: 845
Default Formula help

Hi,

No need for a UDF here is a simple formula

=MID(A1,FIND(" ",A1,FIND(" ",A1)+1)+1,20)

Or you chan choose Data, Text to Columns, Delimited, click Next choose
Space, click Next, select the first two columns in the Data Preview pane and
choose Do not import (Skip), set a destination...

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Steph" wrote:

I have data that looks like this:

S30 1M D C7D
S30 1M D
5W I 4
2W I X AH1

I need a formula that will extract the third group of characters from each
record. The records can be any length and the groups are seperated by
spaces. For example,

From "S30 1M D C7D" I need to extract "D".
From "S30 1M D" I need to extract "D".
From "5W I 4" I need to extract "4".
From "2W I X AH1" I need to extract "X".

Thanks for any help that can be provided.

--
Steph

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.