View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Macro that compares columns and identifies changes

Hi,

I'm sure this is dooable but I cant get my head around what columns E & F
should look like after the code has run so using your sample data please post
what these 2 columns should look like.

Mike

"andrei" wrote:

Let's say i have column A with items , column B with prices , column C with
items and column D with prices again . Items in column A are in column C but
not all of them . Items it column C are in column A but not all of them .
Prices in column D are the current ones .


Example :

A1 : fork
A2 : spoon
A3 : computer

B1 : 2.20
B2 : 1.90
B3 : 400.50

C1 : TV
C2 : computer
C3 : fork


D1 : 190
D2 : 380.90
D3 : 2.20

In E column i want the macro to do this :

E1 : "TV" (item from C1) not found in A column , puts in E1 this code "new
item"

E2 : "computer" (item from C2) found in A column but with different price .
Puts in E2 the price from D2 : "380.90"

E3 : "fork" (item from C3 ) found in A column with same price ( D3=B1) .
Puts in E3 this code "same price"

After that it analises the items which are in A column but not to be found
in C column and puts in F column a code "deleted item "

"spoon" from A2 is not to be found in C column . So , in F2 the cod should
be "deleted item"


Can this be done ?