Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distribute cell content among several cells

Status
Not open for further replies.

Sanasta

Technical User
Joined
Aug 31, 2003
Messages
31
Location
BG
I have a long string in a cell and I want to distribute its content among several cells but not with left, mid or similar functions. For example I want to distribute charaters before word "from" in one cell and charaters after word "from" in other cell, etc. but I don't know how to solve this problem.
Shall appreciate any help
Sanasta
 
Hiya,

try using the Instr function (similar to Find function in Excel itself)

Syntax:
[tt]InStr([Start], StringToSearch, StringToFind[, Compare])[/tt]

The function returns the position in [tt]StringToSearch[/tt] where the [tt]StringToFind[/tt] starts.

E.g.
[tt]InStr(1, "MicrosoftExcel", "Excel")[/tt] will return 10
[tt]Mid("MicrosoftExcel", 1, InStr(1, "MicrosoftExcel", "Excel") - 1)[/tt] will return [tt]Microsoft[/tt]
[tt]Mid("MicrosoftExcel", InStr(1, "MicrosoftExcel", "Excel"))[/tt] will return [tt]Excel[/tt]


Play around with this to parse out the bits of string you need

HTH


Cheers
Nikki
[bat] Look, mommy, I'm flying!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top