View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GB[_3_] GB[_3_] is offline
external usenet poster
 
Posts: 70
Default subString function in Excel(Urgent)

Use the Mid function

For example, =Mid(A1,1,2) returns 2 digits starting at position 1 in the
string - districtid
=Mid(A1,3,2) returns cityid, and so on.

Geoff






"Varinder" wrote in message
...
Hi,
I have some large database files in Excel and I want to
put all the data in a single file. The problem is for
putting all the data in single file is that I have to
break "villageid" into 5 different numbers like suppose
if I have a villageid 1234567891 the first two digit
contains districid , the other two contains cityid, the
other two contains townid etc. I need to break it into 5
different parts so that I can run the SQL query in
Microsoft Excel to compare the data in other files.

Like suppose I have 6 files.
One contain two columns of villageid and name
Other contains 10 columns of districtid and other
facilities.
Other contains 8 columns of cityid and functions.
Other contains 5 columns of townid and seminars.
similarly 2 other files are there.

So, in order to fetch all the data in single file I need
to break it into different number and need to compare it
with columns in other file.