Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Venkatesh V
 
Posts: n/a
Default Extracting the number from a text

Hi,
In a cell say C3, the value is such as S9(09)V(05).

the value of that cell might be in one of the following format:
(1) S(9)V(5)
(2) S9(09)V(05)
(3) S9(9)V(05)
(4) S9(09)V(5)
(5) S(11)

My requirement is: i need to get the numbers extracted which, is present
before & after the letter 'V' & enclosed in parantheses. In some cases, the
letter V may not be there. (for ex: point 5 - here, only one number is there
ie.11)

This extraction should happen ONLY if the cell E3 has the value "COMP-3."


Thanks in Advance.
Venkatesh V
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

First number:

=IF($E$3="COMP-3",MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND
("(",A1)-1),"")

Second number:

=IF(AND($E$3="COMP-3",COUNTIF(A1,"*V*")),SUBSTITUTE(MID
(A1,FIND("V",A1)+2,2),")",""),"")

HTH
Jason
Atlanta, GA

-----Original Message-----
Hi,
In a cell say C3, the value is such as S9(09)V(05).

the value of that cell might be in one of the following

format:
(1) S(9)V(5)
(2) S9(09)V(05)
(3) S9(9)V(05)
(4) S9(09)V(5)
(5) S(11)

My requirement is: i need to get the numbers extracted

which, is present
before & after the letter 'V' & enclosed in parantheses.

In some cases, the
letter V may not be there. (for ex: point 5 - here, only

one number is there
ie.11)

This extraction should happen ONLY if the cell E3 has

the value "COMP-3."


Thanks in Advance.
Venkatesh V
.

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
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM
Defining a number in a cell by text then subtracting it by the tex Crowraine Excel Worksheet Functions 1 December 16th 04 07:49 AM
Formatting a cell as "text" in the number catagory. Ed Excel Worksheet Functions 3 December 7th 04 07:12 PM
What defines number or text Danny J New Users to Excel 3 December 7th 04 07:27 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:06 AM.

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"