That's precisely the point!

Because he's wanting to do this with formulas, he's making the solution more 
complex than necessary.
A VBA solution would be very neat and tidy (use split to load an array, and 
display the array elements in the cells)
A "manual" solution using text-to-Columns is also pretty simple.

However, he INSISTS on an Excel Formula.
Personally, if I needed Excel formulas,  would try something like:

Column "B" = LEFT($A1,FIND(",",$A1)-1)
Column "D" =MID($A1,FIND(",",$A1)+1,2)
Column "E" =MID($A1,FIND(",",SUBSTITUTE($A1,",","",1))+2,50) 

But I'd prefer to use VBA.
 
Paul
-----------------------------------------
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can.” - John Wesley
-----------------------------------------




________________________________
From: Vabz <in.vaib...@gmail.com>
To: excel-macros@googlegroups.com
Sent: Wed, September 12, 2012 8:59:52 AM
Subject: Re: $$Excel-Macros$$ Need help - To divide the string into three parts

hi.. 

what i feel is this solution is very complex !!

Rgds//Vabz

On Tuesday, September 11, 2012 7:09:23 AM UTC+5:30, Asa R. wrote: 
Hi Mangesh,
>I've read your other replies, and as to why you haven't received a formula 
>method -- most people don't want to take the trouble on a volunteer basis to 
>provide a more complex or difficult solution to a given problem when simple 
>solutions exist.  Also in business, the simplest solution is the best value.  
>But I understand that in learning all aspects of a program, sometimes the 
>exercise of solving a problem in various ways is useful.
> 
>I will provide a formula solution for you.  Although it could be solved 
>several 
>ways, I prefer using an array formula, since it can be written in such a way 
>that it can handle a string of text with any number of commas, whereas 
>non-array 
>solutions would be limited to a set maximum.  However, even with the array 
>solution, and even though the array will contain all of the parts of the text 
>string, you will only see on your spreadsheet as many parts as there are cells 
>in the area you place the array formula (there are ways to use array formulas 
>with "too large of arrays" to display on your spreadsheet ,as part of other 
>formulas, that are useful; for example extracting certain values matching a 
>condition, or summarizing the data (in your data, you might want to know how 
>many "Mumbai"s there are, how many "32145"s, etc.), without actually 
>displaying 
>in multiple columns all the split data.
> 
>·        Select any cell on row 2of your spreadsheet, then create the 
>following 
>defined names using the Name Manager (formulas tab in Excel 2007+).  I 
>recommend 
>making them Sheet-level names rather than the default Workbook-level.
>1.       Name
>=$A2
>2.       _Name.Terminated
>=Name&","
>3.       _Name.ColumnIdx
>=TRANSPOSE(ROW(INDIRECT("1:"& LEN(_Name.Terminated)-LEN( 
>SUBSTITUTE(_Name.Terminated,", ","")))))
>4.      _Name.StartPositions
>=IF(Name.ColumnIdx>1,FIND( CHAR(1),SUBSTITUTE(Name,",", 
>CHAR(1),_Name.ColumnIdx-1)))+1
>5.       _Name.StopPositions
>=FIND(CHAR(1),SUBSTITUTE(_ Name.Terminated,",",CHAR(1),_ Name.ColumnIdx))-1
>6.      Name.Columns
>=MID(Name,_Name. StartPositions,_Name. StopPositions-_Name. StartPositions+1)
> 
>The purpose of using the defined names is to simplify the formula by breaking 
>it 
>into steps.  Insofar as the steps are referred to more than once in the 
>formula, 
>it should make the formula faster to evaluate too.  Name.Columnsis the 
>culmination of our calculation and results in an array containing each 
>comma-separated value from column A, divided into separate columns.
> 
>·        To display the column-separated values on your spreadsheet, enter the 
>following formula in B2:
>=Name.Columns
> 
>·        Then highlight from B2to the furthest column on row 2 neededto 
>display 
>the maximum number of values ever expected.  For a maximum of 3 values, 
>highlight B2:D2, or for maximum of 10, B2:K2, etc.
>·        Then hit F2(edit cell) and Ctrl-Shift-Enter(confirm array formula).  
>This confirms a multi-cell array formula over the selected cells.
>·        Copy the array-entered range from row 2 (e.g. B2:D2) to every other 
>row 
>in your table.
> 
>Hope this is of interest,
>Asa
> 
> 
>From:excel-...@googlegroups.com [mailto:excel-...@ googlegroups.com] On Behalf 
>Of Mangesh Vimay
>Sent: Monday, September 10, 2012 4:04 AM
>To: excel-...@googlegroups.com
>Subject: $$Excel-Macros$$ Need help - To divide the string into three parts
> 
>Hi Friends,
> 
>I need your help to divide the string into three parts.
>The description and sample is given below :
>Waiting for your response.
> 
>Thanks.
>
> 
>-- 
>With regards,
> 
>MaNgEsH
> 
>-- 
>Join official facebook page of this forum @ https://www.facebook.com/ 
>discussexcel
> 
>FORUM RULES (1120+ members already BANNED for violation)
> 
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
> 
>2) Don't post a question in the thread of another member.
> 
>3) Don't post questions regarding breaking or bypassing any security measure.
> 
>4) Acknowledge the responses you receive, good or bad.
> 
>5) Cross-promotion of, or links to, forums competitive to this forum in 
>signatures are prohibited. 
>
> 
>6) Jobs posting is not allowed.
> 
>7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
> 
>NOTE : Don't ever post personal or confidential data in a workbook. Forum 
>owners 
>and members are not responsible for any loss.
>--- 
>You received this message because you are subscribed to the Google Groups "MS 
>EXCEL AND VBA MACROS" group.
>To post to this group, send email to excel-...@googlegroups.com.
>To unsubscribe from this group, send email to excel-macros...@ 
googlegroups.com.
> 
> -- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel
 
FORUM RULES (1120+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

 
6) Jobs posting is not allowed.
 
7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners 
and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.

-- 
Join official facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES (1120+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.


Reply via email to