subString function in Excel(Urgent)

V

Varinder

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.
 
G

GB

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top