Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default please help in this program_1

Problem 2 - Delete
Excel Background
In a new sheet go to A1 and enter the value 1. In A2 enter the
following formula:
=IF(RAND()<0.2,A1,A1+1)
Copy the formula down until A30. The result will be groups of
increasing numbers. Select the entire column, Copy, Paste Special...
Values only, to stabilize the data. Now you will have mostly
successive numbers and at times a number will appear twice.
Class Libraries
Repeat what you did with Insert, but now with Delete. Be careful, it
is different to clear a cell's contents by pressing the Delete key in
the keyboard; it is different to delete a cell using the menu command.
VBA Task
Write a VBA macro to go down the list in column A:A. The algorithm
should delete numbers that are not successive. E.g. if you have
numbers 1, 2, 3, 3, 4, 5, 5, 6, the second 3 and the second 5 should
be deleted to reach a perfectly sequential list 1, 2, 3, 4, 5, 6.

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



All times are GMT +1. The time now is 12:17 PM.

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

About Us

"It's about Microsoft Excel"