Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default subString function in Excel(Urgent)

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.




  #2   Report Post  
Posted to microsoft.public.excel.programming
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.






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default subString function in Excel(Urgent)

Thanks GB.

My Problem has been solved. Thanks very much.




-----Original Message-----
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.






.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Substring in excel? How about regular expressions? Samuel Excel Discussion (Misc queries) 8 May 22nd 06 04:43 PM
Can excel macro access SUBstring individual 'char' level? If so how? bxc2739 Excel Discussion (Misc queries) 1 April 25th 06 03:58 PM
can I execute and 'substring' function in Excel Larry Excel Worksheet Functions 4 January 1st 06 08:16 PM
Urgent help with a Function Jeff Excel Discussion (Misc queries) 0 October 4th 05 04:21 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"