Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
BT Connect
 
Posts: n/a
Default Problem importing data from Access

When trying to import some data (names and addresses) from an Access
database, the Excel (2003) import wizard shows a "square" character between
the elements of the Street Address data. I presume these are carriage return
and line feed characters of some sort (?)

How can I enter this character in the Other delimiters box to split out the
different elements of the address?

Any other suggestions would be gratefully received!
Jeff


  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Problem importing data from Access

Chip Pearson has a very nice addin that will help determine what that
character(s) is:
http://www.cpearson.com/excel/CellView.htm

If it turns out to be a single line feed character (char(10)), then you can use
alt-0010 (hit and hold the alt key while typing 0010 using the numbers on the
keypad keys--not above the QWERTY keys).

If it turns out to be the carriage return (char(13)), or a combination of keys
(crlf?), then you could use a macro to clean up the characters (turn one to ""
(nothing) and turn the other to an easily typed, but unused character (! or |).
Then use data|text to columns specifying that character.


Option Explicit
Sub cleanEmUp()

Dim myBadChars As Variant
Dim myGoodChars As Variant
Dim iCtr As Long

myBadChars = Array(Chr(10), Chr(13)) '<--What showed up in CellView?

myGoodChars = Array("","|") '<--the new characters?

If UBound(myGoodChars) < UBound(myBadChars) Then
MsgBox "Design error!"
Exit Sub
End If

For iCtr = LBound(myBadChars) To UBound(myBadChars)
ActiveSheet.Cells.Replace What:=myBadChars(iCtr), _
Replacement:=myGoodChars(iCtr), _
LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False
Next iCtr

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

BT Connect wrote:

When trying to import some data (names and addresses) from an Access
database, the Excel (2003) import wizard shows a "square" character between
the elements of the Street Address data. I presume these are carriage return
and line feed characters of some sort (?)

How can I enter this character in the Other delimiters box to split out the
different elements of the address?

Any other suggestions would be gratefully received!
Jeff


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
BT Connect
 
Posts: n/a
Default Problem importing data from Access

Many thanks, Dave

Jeff


"Dave Peterson" wrote in message
...
Chip Pearson has a very nice addin that will help determine what that
character(s) is:
http://www.cpearson.com/excel/CellView.htm

If it turns out to be a single line feed character (char(10)), then you
can use
alt-0010 (hit and hold the alt key while typing 0010 using the numbers on
the
keypad keys--not above the QWERTY keys).

If it turns out to be the carriage return (char(13)), or a combination of
keys
(crlf?), then you could use a macro to clean up the characters (turn one
to ""
(nothing) and turn the other to an easily typed, but unused character (!
or |).
Then use data|text to columns specifying that character.


Option Explicit
Sub cleanEmUp()

Dim myBadChars As Variant
Dim myGoodChars As Variant
Dim iCtr As Long

myBadChars = Array(Chr(10), Chr(13)) '<--What showed up in CellView?

myGoodChars = Array("","|") '<--the new characters?

If UBound(myGoodChars) < UBound(myBadChars) Then
MsgBox "Design error!"
Exit Sub
End If

For iCtr = LBound(myBadChars) To UBound(myBadChars)
ActiveSheet.Cells.Replace What:=myBadChars(iCtr), _
Replacement:=myGoodChars(iCtr), _
LookAt:=xlPart, SearchOrder:=xlByRows, _
MatchCase:=False
Next iCtr

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

BT Connect wrote:

When trying to import some data (names and addresses) from an Access
database, the Excel (2003) import wizard shows a "square" character
between
the elements of the Street Address data. I presume these are carriage
return
and line feed characters of some sort (?)

How can I enter this character in the Other delimiters box to split out
the
different elements of the address?

Any other suggestions would be gratefully received!
Jeff


--

Dave Peterson



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
Importing Data from Access baconroll Excel Discussion (Misc queries) 2 June 19th 06 01:39 PM
Problems Importing from Access davey Excel Discussion (Misc queries) 1 July 8th 05 05:47 PM
Importing Data & Refresh Data Problem George Excel Discussion (Misc queries) 2 March 28th 05 12:37 AM
Importing data from Access into Excel: prob w/ cutting off fields Nicole L. Excel Worksheet Functions 1 February 7th 05 10:05 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 08:24 PM.

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"