Hi Luke Sir,That was a very brief description, but I think this is what you want.
Formula for company name:
=TRIM(MID(SUBSTITUTE($A1," - ",REPT(" ",999)),999*2,999))
Formula for address (very similar):
=TRIM(MID(SUBSTITUTE($A1," - ",REPT(" ",999)),999*3,999))
plz explain...Hi Luke Sir,
will u let me know please b'coz i din't get abot REPT(" ",999)),999*2,999)) for both.
I'm not sure what you are asking...you want to know how the formula works?
Formula replaces all the " - " dashes with a giant space. The company name is in the 3rd "column" of data, so we go to the 2nd large space, grab a large section (going from that large space to next large space), and then TRIM the data back down to size. The city name is in next column, so we increase the *2 to be *3.
No, you would need to use whatever the unique identifier is between the columns. If it's 4 spaces, replace 4 spaces. If it's a pipe symbol, replace the pipe symbol. If it's a semicolon, replace the semicolon. If it's only single spaces, then you no longer have a unique identifier, and your sample data was not a good representation of your actual data.
If you only have single spaces, no formula would be able to help, as there's no way for the computer to know when one item ends and another begins. You would need either a fixed length, or unique delimiter. Those are the only two options.