When you select a range with a macro

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

Hello,

When you select a range with a macro, via End xldown etc... I would like to
select this range minus 1 column, how is this possbiel in excell

Regards

Patrick
 
Patrick,

Use Resize. Assuming that you have set the selected range to a variable
called tbl, this will cut back 1 column

tbl.Resize(tbl.Rows.Count, _
tbl.Columns.Count - 1).Select


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
DIM Cell as Range

SET Cell = Range("B65000").End(xlUp).Offset(0,-1)


Patrick Molloy
Microsoft Excel MVP
 
Back
Top