#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default Trim

Dear All
in below eg I want to extract only NV,MN ,MF and so on which are user name,
LKOC is remaining for all, other thing are differed.


LKOC_NV_SALARY JUL09 Jones
LKOC_MN_SALARY JUL09-2 Jones
LKOC_MF_BU_SAL_JAN 09
LKOC_PP_BU Salary Feb' 09
LKOC_PP_BU Salary Mar' 09

Thanks for your assistance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Trim

Try
=TRIM(MID(LEFT(SUBSTITUTE(A1,"_",REPT(" ",99),2),99),6,9))

--
Jacob


"Fareez" wrote:

Dear All
in below eg I want to extract only NV,MN ,MF and so on which are user name,
LKOC is remaining for all, other thing are differed.


LKOC_NV_SALARY JUL09 Jones
LKOC_MN_SALARY JUL09-2 Jones
LKOC_MF_BU_SAL_JAN 09
LKOC_PP_BU Salary Feb' 09
LKOC_PP_BU Salary Mar' 09

Thanks for your assistance

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Trim

Hi,

If the code to be extracted is always 2 alphabets/numbers, then you may use

=mid(A2,6,2)

A2 has the string. Please note that this formula assumes the the code will
always start from the 6th position

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Fareez" wrote in message
...
Dear All
in below eg I want to extract only NV,MN ,MF and so on which are user
name,
LKOC is remaining for all, other thing are differed.


LKOC_NV_SALARY JUL09 Jones
LKOC_MN_SALARY JUL09-2 Jones
LKOC_MF_BU_SAL_JAN 09
LKOC_PP_BU Salary Feb' 09
LKOC_PP_BU Salary Mar' 09

Thanks for your assistance


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TRIM Help ! Nikki Excel Discussion (Misc queries) 8 April 22nd 09 06:20 PM
Using =TRIM() Chuda Excel Worksheet Functions 6 November 9th 06 03:05 PM
Trim Steved Excel Worksheet Functions 7 August 1st 06 05:43 AM
Trim if? John Excel Worksheet Functions 6 June 26th 06 04:44 PM
trim geza Excel Worksheet Functions 2 June 8th 05 07:03 PM


All times are GMT +1. The time now is 05:00 PM.

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

About Us

"It's about Microsoft Excel"