Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Query AS400 and unknown character

I'm using Excel to query an AS400 library file. The query is returning a
combination of numerical and alpha-numerical values. When I use VLookup to
find specific data that was returned by the query, the VLookup does not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Query AS400 and unknown character

Don,

Can you provide an example of the data being returned by the query?

Donnie

"D.S." wrote in message
...
I'm using Excel to query an AS400 library file. The query is returning a
combination of numerical and alpha-numerical values. When I use VLookup

to
find specific data that was returned by the query, the VLookup does not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not

finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Query AS400 and unknown character

Part No ITNBR
#VALUE! 1FRG3238
#VALUE! 1FRG3239
1202301 1202301
1202301 1202301



Column 'A' and 'B' from my worksheet.
Column 'A' is populated with this formula:
=+VALUE(B1 or whatever the relevant cell is)

I'm actually using the VLookup for values in column 'A' , because it does
not
recognize the values in column 'B', perhaps a non blank character is hiding
there. The AS400 query is returning the values in column 'B'. The formula
in column 'A' is providing me with a limited work-around, BUT, it has
trouble with the AlphaNumerical values.

D.S.

"Donnie Stone" wrote in message
...
Don,

Can you provide an example of the data being returned by the query?

Donnie

"D.S." wrote in message
...
I'm using Excel to query an AS400 library file. The query is returning

a
combination of numerical and alpha-numerical values. When I use VLookup

to
find specific data that was returned by the query, the VLookup does not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not

finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Query AS400 and unknown character

Hi,
Try

Application.worksheetfunctions.Clean(Trim(QueryVal ue))

The Clean removes non printing characters and the Trim leading or trailing spaces.

regards
Paul

"D.S." wrote in message ...
I'm using Excel to query an AS400 library file. The query is returning a
combination of numerical and alpha-numerical values. When I use VLookup to
find specific data that was returned by the query, the VLookup does not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Query AS400 and unknown character

Great, that works for column 'A', is it possible to use this somehow to
clean column 'B' during the query process and just eliminate the need for
column 'A' ?

D.S.

"Paul Robinson" wrote in message
om...
Hi,
Try

Application.worksheetfunctions.Clean(Trim(QueryVal ue))

The Clean removes non printing characters and the Trim leading or trailing

spaces.

regards
Paul

"D.S." wrote in message

...
I'm using Excel to query an AS400 library file. The query is returning

a
combination of numerical and alpha-numerical values. When I use VLookup

to
find specific data that was returned by the query, the VLookup does not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not

finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Query AS400 and unknown character

Don,

Try this solution. It was posted a while back.

Sub trythis()

Dim s As String
Dim c As Range, myRng As Range

Set myRng = ActiveSheet.UsedRange.Columns(2).Cells

For Each c In myRng
With c
s = CStr(.Value)
s = UCase(WorksheetFunction.Clean(WorksheetFunction.Tr im(s)))
.Value = s
.Rows.AutoFit
End With
Next

End Sub
"D.S." wrote in message
...
Great, that works for column 'A', is it possible to use this somehow to
clean column 'B' during the query process and just eliminate the need for
column 'A' ?

D.S.

"Paul Robinson" wrote in message
om...
Hi,
Try

Application.worksheetfunctions.Clean(Trim(QueryVal ue))

The Clean removes non printing characters and the Trim leading or

trailing
spaces.

regards
Paul

"D.S." wrote in message

...
I'm using Excel to query an AS400 library file. The query is

returning
a
combination of numerical and alpha-numerical values. When I use

VLookup
to
find specific data that was returned by the query, the VLookup does

not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not

finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Query AS400 and unknown character

I've been given a new job assignment, so I'll have to pull away from this
for a few days, will try soon, and post another reply later.

I will add though, that while I thought the < worksheetfunction.clean was
working, apparently it is not. The Cells in column 'A' (refer to earlier
post on 11/30/03), while appearing to display the correct value, are still
not recognized by the VLookup function.

Gratefully,
D.S.

"Donnie Stone" wrote in message
...
Don,

Try this solution. It was posted a while back.

Sub trythis()

Dim s As String
Dim c As Range, myRng As Range

Set myRng = ActiveSheet.UsedRange.Columns(2).Cells

For Each c In myRng
With c
s = CStr(.Value)
s = UCase(WorksheetFunction.Clean(WorksheetFunction.Tr im(s)))
.Value = s
.Rows.AutoFit
End With
Next

End Sub
"D.S." wrote in message
...
Great, that works for column 'A', is it possible to use this somehow to
clean column 'B' during the query process and just eliminate the need

for
column 'A' ?

D.S.

"Paul Robinson" wrote in message
om...
Hi,
Try

Application.worksheetfunctions.Clean(Trim(QueryVal ue))

The Clean removes non printing characters and the Trim leading or

trailing
spaces.

regards
Paul

"D.S." wrote in message

...
I'm using Excel to query an AS400 library file. The query is

returning
a
combination of numerical and alpha-numerical values. When I use

VLookup
to
find specific data that was returned by the query, the VLookup does

not
recognize the values as they "appear" to be. There is apparently an
additional character in the value that is not apparent. I've tried
searching the data for the infamous Alt-0160 character, but I'm not

finding
that. Any ideas as to what's going on, or how to compensate for it?

D.S.







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
Wildcard Character Placement in MS Query DT Excel Discussion (Misc queries) 0 November 14th 07 10:04 PM
Wildcard character in MS Query Grd Excel Discussion (Misc queries) 2 November 5th 07 10:31 PM
UnKnown Character Removal CyndyG Excel Worksheet Functions 2 April 28th 05 01:42 AM
Unknown Character removal Jerrard Excel Worksheet Functions 3 November 5th 04 10:46 PM
SQL against AS400 R. Choate Excel Programming 4 November 7th 03 09:11 PM


All times are GMT +1. The time now is 09:42 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"