View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Replace data with new data

Hi
one question: Are these to entries in two different columns? if yes you
don't need any code juyt add a helper column C and enter the formula
=IF(A1=123,"Widget",IF(A1=124,"Bodget",IF(A1=125," Scarper",""))
if you have more items you may consider using VLOOKUP for this. copy
this formula down as far as you need it



--
Regards
Frank Kabel
Frankfurt, Germany

I have a data file which I recieve regularly which needs to be

cleaned
up before I use it. The data looks like this

Item Description
123, Widget
124, Bodgit
125, Scarper
123, Unknown
124, Unknown
125, Unknown

Does anyone have a routine which could go through the above data and
make sure that the second field is corrected to what the description
should be ?

I.e.

If first cell value equals 123, then make second cell value = widget
Or
If first cell value equals 124, then make second cell value = bodgit
Or
If first cell value equals 125, then make second cell value = scarper

The idea being that for every example of unclean data I come across,

I
would copy an extra line of code which deals with it in future
editions of the data file that comes in.

Hope someone can help ?

Thanks


Terry


---
Message posted from http://www.ExcelForum.com/