Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 124
Default Counting Characters

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Counting Characters

Why not import the file again and specify fixed-width in the Import
Wizard?

Alternatively, you can use

=LEFT(A1,8)

to get the first 8 characters from A1, and

=MID(A1,9,8)

to get the next 8 characters, and

=MID(A1,17,8)

to get the next 8 characters, etc.

Hope this helps.

Pete

Ryan wrote:

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Counting Characters

First 8 characters can be extracted by =LEFT(A1) and filling down.

9 through 16 can be extracted by =MID(A1,9,5) and filling down.

Dave
--
Brevity is the soul of wit.


"Ryan" wrote:

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 124
Default Counting Characters

I am trying to move the data from one worksheet to another. The source
worksheet is called "Demo File". What would my formula be? Thank you very
much for your help so far.

"Pete_UK" wrote:

Why not import the file again and specify fixed-width in the Import
Wizard?

Alternatively, you can use

=LEFT(A1,8)

to get the first 8 characters from A1, and

=MID(A1,9,8)

to get the next 8 characters, and

=MID(A1,17,8)

to get the next 8 characters, etc.

Hope this helps.

Pete

Ryan wrote:

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 124
Default Counting Characters

When I get to the last set do I use right?

"Ryan" wrote:

I am trying to move the data from one worksheet to another. The source
worksheet is called "Demo File". What would my formula be? Thank you very
much for your help so far.

"Pete_UK" wrote:

Why not import the file again and specify fixed-width in the Import
Wizard?

Alternatively, you can use

=LEFT(A1,8)

to get the first 8 characters from A1, and

=MID(A1,9,8)

to get the next 8 characters, and

=MID(A1,17,8)

to get the next 8 characters, etc.

Hope this helps.

Pete

Ryan wrote:

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Counting Characters

Ok, Ryan, assume your data is currently in column A of the sheet "Demo
File", and you have another sheet in the same workbook called Sheet2.
Put these formulae in the cells specified in Sheet2:

A1: =LEFT('Demo File'!A1,8)
B1: =MID('Demo File'!A1,9,8)
C1: =MID('Demo File'!A1,17,8)
D1: =MID('Demo File'!A1,25,8)

etc, to cover your data. Note the use of apostrophes, because you have
a space in your sheet name. Then highlight these cells, click <copy
and paste them into cells A2 downwards to cover the extent of your data
in Demo File.

Then highlight all the cells with these formulae in, click <copy, then
Edit | Paste Special | Values (check) | OK then <Enter

This will fix the values in Sheet2, and then you could delete the File
Demo sheet if you no longer need it.

An alternative approach would be to use Data | Text to Columns directly
on your data in the File Demo sheet, and you could split the data into
columns B onwards without any formulae.

Hope this helps.

Pete

Ryan wrote:

I am trying to move the data from one worksheet to another. The source
worksheet is called "Demo File". What would my formula be? Thank you very
much for your help so far.

"Pete_UK" wrote:

Why not import the file again and specify fixed-width in the Import
Wizard?

Alternatively, you can use

=LEFT(A1,8)

to get the first 8 characters from A1, and

=MID(A1,9,8)

to get the next 8 characters, and

=MID(A1,17,8)

to get the next 8 characters, etc.

Hope this helps.

Pete

Ryan wrote:

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Counting Characters

You could use RIGHT for the last set of data, but if your data is not
an exact multiple of 8 characters in length then you may need a
different value than 8 in the formula:

=RIGHT(A1,8) or =RIGHT('File Demo'!A1,8)

Hope this helps.

Pete

Ryan wrote:

When I get to the last set do I use right?

"Ryan" wrote:

I am trying to move the data from one worksheet to another. The source
worksheet is called "Demo File". What would my formula be? Thank you very
much for your help so far.

"Pete_UK" wrote:

Why not import the file again and specify fixed-width in the Import
Wizard?

Alternatively, you can use

=LEFT(A1,8)

to get the first 8 characters from A1, and

=MID(A1,9,8)

to get the next 8 characters, and

=MID(A1,17,8)

to get the next 8 characters, etc.

Hope this helps.

Pete

Ryan wrote:

I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Counting Characters

Have you tried
datatext to columnsfixed widthset as desired
or a maco to do the same
or a macro to use LEFT & MID (look in the help index)

--
Don Guillett
SalesAid Software

"Ryan" wrote in message
...
I have imported a text file that has no delimeters. I would like to count
the first 8 characters and have excell make that field 1, then count
characters 9 thru 16 and make that field 2, ect.... Can anyone help???



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
Counting characters in text cell to find 255 limit Dunc Excel Discussion (Misc queries) 2 January 22nd 07 09:36 PM
counting characters inside a cell simonsmith Excel Discussion (Misc queries) 5 July 26th 06 07:30 PM
Counting characters sdmccabe Excel Discussion (Misc queries) 2 March 27th 06 08:10 PM
counting characters in a line Johnny D Excel Discussion (Misc queries) 2 February 1st 06 09:11 PM
Problem with counting characters in a cell Tink Excel Worksheet Functions 2 June 27th 05 12:52 PM


All times are GMT +1. The time now is 03:14 PM.

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

About Us

"It's about Microsoft Excel"