![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 752
|
I am inporting a fixed width report into Excel, but at times 2 columns overlap. In cell A1 I have the account # and in B2 I have the account Name.
I need two things. 1. What would be the function to delete the characters at end of the account number (a1), some accounts begin with numbers. There is a space from the end of the Acc # and Letter. 2. What if I wanted this character too be put in the begining of cell B1. Thanks |
|
|
|
|
|
#2 | ||||||||||||||||||||||||||||||||||||||||||||||
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
Click on a hyperlinked cell to see the underlying formula [ This Message was edited by: Yogi Anand on 2002-05-23 10:55 ] |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Do you have a problem with the fixed width report itself? Are the account numbers variable length and not padded with enough trailing spaces to insure that the name on each row starts in the same column position?
[ This Message was edited by: Mark W. on 2002-05-23 10:59 ] |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 752
|
In reply to Mark's question, that is correct, I don't have a problem with the rest of the report just this portion. Like you said it is not padded.
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Los Angeles, CA
Posts: 752
|
Yogi, what if the account number varies.
Ex. In cell A1 C002051 This is ok Z9M05 This is ok 601954 M WRONG a letter is at the end A0064901 This is ok 602003 H WRONG a letter is at the end I hope this gives you a better picture, Thanks. |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
So, am I correct in saying that this report really isn't fixed length? And, if it isn't... is it possible that the report is space delimited?
[ This Message was edited by: Mark W. on 2002-05-23 11:45 ] |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
If needed, insert a column next to A, apply Data|Text to Columns to A, and in D1 enter: =B1&C1 and copy down. Apply Edit|Copy, then Edit|Paste Special >Values. Delete unwanted columns. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|