ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   MS Query (https://www.excelbanter.com/excel-worksheet-functions/100240-ms-query.html)

Suzseb

MS Query
 
I have an Excel database that I'm querying. One of my fields has code
information: some are just numeric (88523) and some are alphanumeric (P5036).
When I get the results of my query, the alphanumeric fields are left blank.
The rest of the record is intact. I've tried various combinations of
formatting the fields and have not been able to get around this. Does anyone
have a solution?

Thanks

--
Suz

Ron Coderre

MS Query
 
I believe MS Query looks at the first records to determine the field type. If
they are numeric, it sets the field as numeric and sets all text values to
null. Alternatively, if Excel decides that the field contains text, numeric
values will be set to null.

Try this:
Set the alphanumeric column format to TEXT, then use one of the various
methods to insure that all of the values become text.
(eg <data<text-to-columns....set the field to text., etc

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Suzseb" wrote:

I have an Excel database that I'm querying. One of my fields has code
information: some are just numeric (88523) and some are alphanumeric (P5036).
When I get the results of my query, the alphanumeric fields are left blank.
The rest of the record is intact. I've tried various combinations of
formatting the fields and have not been able to get around this. Does anyone
have a solution?

Thanks

--
Suz


Suzseb

MS Query
 
That worked, thanks!

I'll have to remember the data-text to columns commands.
--
Suz


"Ron Coderre" wrote:

I believe MS Query looks at the first records to determine the field type. If
they are numeric, it sets the field as numeric and sets all text values to
null. Alternatively, if Excel decides that the field contains text, numeric
values will be set to null.

Try this:
Set the alphanumeric column format to TEXT, then use one of the various
methods to insure that all of the values become text.
(eg <data<text-to-columns....set the field to text., etc

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Suzseb" wrote:

I have an Excel database that I'm querying. One of my fields has code
information: some are just numeric (88523) and some are alphanumeric (P5036).
When I get the results of my query, the alphanumeric fields are left blank.
The rest of the record is intact. I've tried various combinations of
formatting the fields and have not been able to get around this. Does anyone
have a solution?

Thanks

--
Suz



All times are GMT +1. The time now is 10:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com