Compare and delete cell?

  • Thread starter Thread starter Jan
  • Start date Start date
J

Jan

Monday Thuesday Wednesday
123 123 123
123 452 545
234 345 675
432
234

I want that the macro delete the cell in the column thuesday because
that's the same number as in monday. Also delete cell in Wednesday
because it is already in monday.

How to do this,

Thanks
Jan
 
Do you want to only delete the entries in column B or C the cell has th
same value as in column A of the same row, or if the value appear
anywhere in column A
 
hey,
something like that should do it. Check my spelling.

dim ws as worksheet
set ws as thisworksheet
dim x,y,z as integer
x=YourNumberOfColumns
y=your number of rows
for z=1 to y
do while x > 1
if ws.cells(y,x).value=ws.cells(y,x-1).value then ws.cells(y,x).value=""
x=x-1
loop
next
 
Back
Top