LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.setup
CamiIRE
 
Posts: n/a
Default Line selection from a cell script through a VBA macro

Hi!
I would like to make a selection through a complete data set by selecting
lines based on the script in on cell of each line. for example:

Line/Column: A B C
1 X1 2 Y1
2 X2 2 Y2
3 X3 5 Y3
4 X4 7 Y4

Say n: the line number, stating at n=1

I want the macro to start inside cell "B (n)",
read the value,
go to cell "B (n+1)"
if cell "B (n)"= cell "B (n+1)"
then erase line (n+1)
Implement n = n+1
Start again
if cell "B (n)" different to cell "B (n+1)"
Implement n = n+1
Start again

The result would be here taht line 1,3 and 4 are kept while the 2nd one is
erased.

It would be great if you can help me!

Many thanks :)

 
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
Row Expansion Susan Excel Worksheet Functions 11 February 28th 06 07:15 PM
Macro for cell selection starting with Last Cell Valerie Excel Worksheet Functions 4 December 9th 05 08:25 PM
Macro help - copy a cell down gjcase Excel Discussion (Misc queries) 3 September 4th 05 05:09 AM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 08: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"