Excel

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

Guest

I have a report that is being exported from Crystal Reports into Excel; the
report contains two numeric columns.

When the report is run, I would like to convert the numeric columns to words
based on the contents of the cell. i.e. if the cell contains 1, change the 1
to 'Fred', if 2, change the 2 to 'John', etc.

Can anybody please suggest an answer?

Thanks.
 
Easily done for your example.

=LOOKUP(B1,{1,2},{"Fred","John"}) Copy down column B

It is the "etc." that always makes it a little more difficult.

"etc." could be 3 more numbers and names or 123 numbers and names.

With many you should create a Lookup table and use VLOOKUP formulas.

Table in D1:E1

Numbers in column A

In B1 enter =VLOOKUP(A1,Table,2,FALSE)


Gord Dibben MS Excel MVP
 

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