Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Compare and delete cell?

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

--
--
Jan

United Kingdom, London
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compare and delete cell?

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

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Compare and delete cell?

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



Jan wrote in message
...
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

--

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare and delete duplicate records charles Excel Worksheet Functions 3 June 17th 08 11:46 AM
Compare and delete in excel Please help in building a Vba in excel Excel Worksheet Functions 5 March 22nd 07 06:01 PM
Compare & Delete Centrol Excel Discussion (Misc queries) 2 September 26th 05 07:17 AM
Compare and delete or return value? shaun nieves[_4_] Excel Programming 3 May 26th 04 06:59 PM
compare names and delete duplicates Marcia[_2_] Excel Programming 0 November 13th 03 11:02 PM


All times are GMT +1. The time now is 03:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"