snopes.com  

Go Back   snopes.com > Non-UL Chat > Techno-Babble

Reply
 
Thread Tools Display Modes
  #1  
Old 22 October 2009, 03:20 PM
Lainie's Avatar
Lainie Lainie is offline
 
Join Date: 29 August 2005
Location: Suburban Columbus, OH
Posts: 28,271
Default Exporting Access Yes-No Fields

So I have this Access query I've built that includes Yes-No fields. I need to export the list to Excel for review, editing, etc. I know from experience that the Yes-No fields will export into Excel as 0s and -1s. I don't want that. I want the Yeses to be little Xs and the Nos to be empty cells.

So far, I've thought of two ways around this, both annoying although not a huge amount of work:

1. In Access, before exporting, create another query, with formulas that convert the Yeses and Nos appropriately.

2. In Excel, after exporting, do a Search/Replace, replacing 0s with nothing and -1s with Xs. This one seems like less work.

Any other ideas?
__________________
I just don't want to date an older woman. They look at love with a jaundiced eye. I can jaundice a woman on my own, I don't need her to be pre-jaundiced. -- Garrison Keillor, as Guy Noir
Reply With Quote
  #2  
Old 22 October 2009, 04:01 PM
ganzfeld's Avatar
ganzfeld ganzfeld is offline
 
Join Date: 05 September 2005
Location: Kyoto, Japan
Posts: 10,193
Default

Quote:
Originally Posted by Lainie View Post
2. In Excel, after exporting, do a Search/Replace, replacing 0s with nothing and -1s with Xs. This one seems like less work.
This is what I'd do. You can write a little formula in Excel to do it but, unless I were going to be doing it dozens of times over the next few weeks, why bother.
Reply With Quote
  #3  
Old 22 October 2009, 04:05 PM
Lainie's Avatar
Lainie Lainie is offline
 
Join Date: 29 August 2005
Location: Suburban Columbus, OH
Posts: 28,271
Default

Yeah, I probably wouldn't bother writing a formula. Although I may, in fact, be doing it a number of times over the next few weeks or months, now that I think about it. I'll also have to take changes made in Excel by other users and somehow record them in the Access database.

It's an interesting project.I'm trying to determine appropriate user security levels in a new system, based on those same users' security levels in a legacy system. The challenge is that the security architecture of the two systems is radically different. We've also changed job structures and responsibilities recently, and the legacy system's security levels are still somewhat based on the old structures and responsibilities.
__________________
I just don't want to date an older woman. They look at love with a jaundiced eye. I can jaundice a woman on my own, I don't need her to be pre-jaundiced. -- Garrison Keillor, as Guy Noir
Reply With Quote
  #4  
Old 24 October 2009, 09:50 PM
Ducky's Avatar
Ducky Ducky is offline
 
Join Date: 16 June 2004
Location: South Carolina
Posts: 2,473
Default

I wonder if you can set up some sort of macro to convert the 0s and -1s. So when you import from Access you then can just highligiht the column then hit the macro button.

That may or may not be the same idea as the formula idea already mentioned.

I thought of that because I once did a spread sheet where I wanted the addresses all in Caps. I was able to find a code snippt for a macro to convert lowercase to uppercase. Every time after that I entered addresses in lower case then was able to just click the button to convert. Sure that was more work as I could have just hit the caps key but I generally have 3 different things going on on my computer and forget that I have the cap key on lol.
__________________
Clever Waste of Time Riddle A great Riddle and much more
Nordinho- Games! Purple Hell- Riddle Tools/Forum
The Arccivo!- For all your scrapbooking needs!
Reply With Quote
  #5  
Old 24 October 2009, 10:14 PM
Dactyl's Avatar
Dactyl Dactyl is offline
 
Join Date: 02 December 2005
Location: Hampshire, UK
Posts: 4,237
Default

Quote:
Originally Posted by Lainie View Post
So I have this Access query I've built that includes Yes-No fields. I need to export the list to Excel for review, editing, etc. I know from experience that the Yes-No fields will export into Excel as 0s and -1s. I don't want that. I want the Yeses to be little Xs and the Nos to be empty cells.

So far, I've thought of two ways around this, both annoying although not a huge amount of work:

1. In Access, before exporting, create another query, with formulas that convert the Yeses and Nos appropriately.

2. In Excel, after exporting, do a Search/Replace, replacing 0s with nothing and -1s with Xs. This one seems like less work.

Any other ideas?
I would hide the -1 and 0 cells, add a new column next to it and put the following code into the new column:

=IF(A1=-1,"X","")

Where A1 is the cell reference for the imported information. You can then just copy this down as you would any other formula.

Example (without hiding the column):

__________________
Move the bloody pram!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT. The time now is 12:52 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.