converting text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that is linked to an Excel spreadsheet. For ease of use,
when the spreadsheet is populated several of the answers are typed as single
characters, for example: I is used to represent IN-TIME, E = EARLY. I would
like to avoid having to run a find/replace on the spreadsheet each time new
data is entered.

The query I am using counts the number of IN-TIMES, EARLY's, etc. and is
used as the backend for a report. Is there a way to have either the query or
the report automatically convert the single character into the appropriate
word?

Thanks
 
twd said:
I have a database that is linked to an Excel spreadsheet. For ease of use,
when the spreadsheet is populated several of the answers are typed as single
characters, for example: I is used to represent IN-TIME, E = EARLY. I would
like to avoid having to run a find/replace on the spreadsheet each time new
data is entered.

The query I am using counts the number of IN-TIMES, EARLY's, etc. and is
used as the backend for a report. Is there a way to have either the query or
the report automatically convert the single character into the appropriate
word?

You can use the IIf() function or the Switch() function. E.g.:

IIf(Answer="I","In-Time", IIf(Answer="E","Early"))

Switch(Answer="I", "In-Time", Answer="E","Early")

I like Switch, 'cuz it's cleaner.
 
Sweet!, Thanks for the quick response

MGFoster said:
You can use the IIf() function or the Switch() function. E.g.:

IIf(Answer="I","In-Time", IIf(Answer="E","Early"))

Switch(Answer="I", "In-Time", Answer="E","Early")

I like Switch, 'cuz it's cleaner.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top