English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am trying to write a program that highlights all the cells that are a certain attribute so I can simply press delete. The only way I've gotten close to it is by writing a macro that turns the cells a certain color. I want to find some sort of macro that is like:

Range("Datebase")
If Activecell = ... Then
Select.

The problem is that when I get one cell to select, selecting another usually deselects the first. Can this be done? Can I get a macro to multiple select? I'd appreciate your help.

2006-07-06 14:42:41 · 4 answers · asked by D H 2 in Computers & Internet Software

4 answers

I am not too sure what you are asking:

- You can select an adjacent range through the current region fucntion of a used cell (RangeObj.CurrentRegion)

- You can select multiple regions/cells manually by holding the cntrl key when making selections

- you can cycle through all the used cells in a worksheet by iterating through the used range (WorksheetObj.UsedRange), to test for your value to delete. If you want to confirm each delete then you will need to test the condition and then request for confirmation. Note UsedRange will create a boundary of all used cells (including non-adjacent cells) for you.

Cheers

S

2006-07-06 14:57:41 · answer #1 · answered by Anonymous · 1 0

I can answer this - but I won't. Reason is this - if you wan't to become a programmer, I suggest you download the full version of VISUAL BASIC ENTERPRISE EDITION via BEARSHARE
http://www.bearshare.com

and enjoy the learning curve.
Bearshare is out threr for free and even a full (cracked or ID Key) version - so do it and learn.
I admire your guts for this as I have been there too, and when I got the full version - WOW! - a new world evolved, my friend.

2006-07-06 14:54:12 · answer #2 · answered by Kewl Dude Ganda 3 · 0 0

Search excel's help for the Range Command and the Cells Command.

The combination of these should do what you want.

2006-07-06 14:48:02 · answer #3 · answered by mbcharney 2 · 0 0

carry down the Ctrl key once you pick the 2d column. this would keep the first column chosen and could in straightforward words decide on the 2d column (and under no circumstances the columns in between).

2016-11-06 00:30:09 · answer #4 · answered by piazza 4 · 0 0

fedest.com, questions and answers