Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
0-0 Wai Wai ^-^
 
Posts: n/a
Default Chop off parts of the statement


Chop off parts of the statement

Hi.
I would like to do the following:
1) Chop the right part
eg For cells containing "Hi. I'm John"; "Hi, I'm Peter" [without quotes], chop
off the rightmost 8 units, ie "Hi. I'm " [without quotes]

2) Chop the middle part
eg chop any unit between 5-12 (inclusive). For statement like "It's a sunny
day." , it will become "It's day" [without quotes],

3) Chop the left part
eg For cells containing 123 456 000; 345 455 000, chop off the leftmost 3
units, ie the last 3 figures

4) Chop based on criteria
eg For cells containing "There're lots of things like apples, bananas, pears
etc.", chop off anything from the right until it meets the word "like" OR chop
off anything from the left untile it meets the word "apples".

Thank you very much.

--
Additional information:
- I'm using Office XP
- I'm using Windows XP


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Chop off parts of the statement

1)
You probably mean "leave the leftmost 8"
=LEFT(A1,8)
2)
=LEFT(A2,4)&RIGHT(A2,LEN(A2)-12)
3)
=RIGHT(A3,LEN(A3)-3)
4)
=LEFT(A4,FIND("@",SUBSTITUTE(A4,"like","like@")))

--
Kind regards,

Niek Otten

"0-0 Wai Wai ^-^" wrote in message ...
|
| Chop off parts of the statement
|
| Hi.
| I would like to do the following:
| 1) Chop the right part
| eg For cells containing "Hi. I'm John"; "Hi, I'm Peter" [without quotes], chop
| off the rightmost 8 units, ie "Hi. I'm " [without quotes]
|
| 2) Chop the middle part
| eg chop any unit between 5-12 (inclusive). For statement like "It's a sunny
| day." , it will become "It's day" [without quotes],
|
| 3) Chop the left part
| eg For cells containing 123 456 000; 345 455 000, chop off the leftmost 3
| units, ie the last 3 figures
|
| 4) Chop based on criteria
| eg For cells containing "There're lots of things like apples, bananas, pears
| etc.", chop off anything from the right until it meets the word "like" OR chop
| off anything from the left untile it meets the word "apples".
|
| Thank you very much.
|
| --
| Additional information:
| - I'm using Office XP
| - I'm using Windows XP
|
|


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
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Not sure which function and how to use it. Help Damon Johnson Excel Worksheet Functions 2 July 25th 05 11:09 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
Matching parts to model numbers Craig wotdoo Excel Discussion (Misc queries) 4 May 12th 05 05:56 AM


All times are GMT +1. The time now is 10:46 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"