View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] crankylemming@googlemail.com is offline
external usenet poster
 
Posts: 4
Default Code to replace specific text

Hi

I'm wondering if anyone could advise me on this.

Within a worksheet detailing business credit card purchases, I have 2 columns which list a description of the purchase (col G) and the name of the vendor (col H)

I'm currently working on a macro that sorts the worksheet by various criteria, and I want to include in the same macro an element of tidying the data so that, if the 'description' cell says 'No Description' (this is from the credit card source data), I'd like to replace it with the content of the corresponding vendor cell:

Col G Col H
Laptop PC Store
No Description PC Store
Keyboard Amazon

becomes

Col G Col H
Laptop PC Store
PC Store PC Store
Keyboard Amazon

And I'm completely stumped on how to do it.

Any advice would be greatly appreciated.

Thanks

Steve