#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Excel

Well, it depends on how many numbers you're talking about. If it's 1 and 2,
then =IF(A1=1,"Fred","John") works. But if you're talking about dozens of
different numbers, you should ue the VLOOKUP function. See here for info:
http://www.techonthenet.com/excel/formulas/vlookup.php

Post back if you have questions.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Sapperre" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Excel

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

On Tue, 27 Feb 2007 09:12:17 -0800, Sapperre
wrote:

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.


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



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