expand a hi-lited cells to include more cells using macro in excel 2007

0

I've hi-lited a section in my table and would want a macro to either expand the selection to include 2 more adjacent cells below the selection or exclude 2 more cells at the bottom of the selection. I'm using Excel 2007.

Bob

Posted 2018-02-15T04:45:22.543

Reputation: 1

Better you edit the question and illustrated the Criteria to Conditional Format, along with condition, why and when you want to expand & squeeze the selection. – Rajesh S – 2018-02-15T07:58:50.677

You begin by talking about "highlighting" and later talk about "selecting". Do you mean selecting cells (as you do when you left-click and drag the mouse over them), or setting the fill colour (using the Fill Color tool in the Home tab of the ribbon), or using Conditional Formatting? – Blackwood – 2018-02-15T13:10:17.533

I've selected/hi-lited cells B3:B10. With the help of a macro, I wish to trim the selection from B3:B10 to B3:B8. It is part of a string of codes I've written and am stumped in figuring this particular one out. – Bob – 2018-02-16T03:29:43.370

I've figured it out and have included an example script below:
Range(Selection, Selection.SpecialCells(xlLastCell)). _ Resize(Range(Selection, Selection.SpecialCells(xlLastCell)).Rows.Count - 1, _ Range(Selection, Selection.SpecialCells(xlLastCell)).Columns.Count).Select
– Bob – 2018-02-21T22:36:13.447

No answers