Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
9,Bhagyoday Estate, Ajod Dairy Road, Rakhial Industrial Area, Ahmedabad - 380023 Gujarat 181, Industrial area - A, Ludhiana - 141003 Punjab Opposite Rotomac Pens, Sarkhej Bavla Highway, Village Moraiya, Ta-Sanand, Sanand - 382213 Gujarat 41/B, Lalbaug Industrial Estate, Dr.Ambedkar Road, Lalbaug, Mumbai - 400012 Maharastra I want to split this into Address, city, pincode & State. Can you help me? Regards, Ashwini |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If these texts are placed in separate cells, e.g. like this:
A1: 9,Bhagyoday Estate, Ajod Dairy Road, Rakhial Industrial Area, Ahmedabad - 380023 Gujarat A2: 181, Industrial area - A, Ludhiana - 141003 Punjab A3: Opposite Rotomac Pens, Sarkhej Bavla Highway, Village Moraiya, Ta-Sanand, Sanand - 382213 Gujarat A4: 41/B, Lalbaug Industrial Estate, Dr.Ambedkar Road, Lalbaug, Mumbai - 400012 Maharastra then install this UDF: Public Function FindRev(StrtoSearch As String, StrSearchedFor As String) As Long FindRev = 0 On Error Resume Next FindRev = InStrRev(StrtoSearch, StrSearchedFor) End Function Formula for address: =TRIM(LEFT(A1,FindRev(A1,",")-1)) for city: =TRIM(MID(A1,FindRev(A1,",")+1,SEARCH("-",A1)-FindRev(A1,",")-1)) for code: =TRIM(MID(A1,SEARCH("-",A1)+2,6)) for state: =TRIM(MID(A1,SEARCH("-",A1)+8,256)) Regards, Stefi |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Or - without UDF:
Formula for address: =TRIM(LEFT(A1,FIND("*",SUBSTITUTE(A1,",","*",LEN(A 1)-LEN(SUBSTITUTE(A1,",",""))))-1)) for city: =TRIM(MID(A1,FIND("*",SUBSTITUTE(A1,",","*",LEN(A1 )-LEN(SUBSTITUTE(A1,",",""))))+1,SEARCH("-",A1)-FIND("*",SUBSTITUTE(A1,",","*",LEN(A1)-LEN(SUBSTITUTE(A1,",",""))))-1)) Regards, Stefi Stefi ezt ร*rta: If these texts are placed in separate cells, e.g. like this: A1: 9,Bhagyoday Estate, Ajod Dairy Road, Rakhial Industrial Area, Ahmedabad - 380023 Gujarat A2: 181, Industrial area - A, Ludhiana - 141003 Punjab A3: Opposite Rotomac Pens, Sarkhej Bavla Highway, Village Moraiya, Ta-Sanand, Sanand - 382213 Gujarat A4: 41/B, Lalbaug Industrial Estate, Dr.Ambedkar Road, Lalbaug, Mumbai - 400012 Maharastra then install this UDF: Public Function FindRev(StrtoSearch As String, StrSearchedFor As String) As Long FindRev = 0 On Error Resume Next FindRev = InStrRev(StrtoSearch, StrSearchedFor) End Function Formula for address: =TRIM(LEFT(A1,FindRev(A1,",")-1)) for city: =TRIM(MID(A1,FindRev(A1,",")+1,SEARCH("-",A1)-FindRev(A1,",")-1)) for code: =TRIM(MID(A1,SEARCH("-",A1)+2,6)) for state: =TRIM(MID(A1,SEARCH("-",A1)+8,256)) Regards, Stefi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Query from microsoft query- Excel 2007 | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |