0

I'm trying to select multiple columns, i.e. Column A to Column F and Column H using the following formula:

enodebdata.Range(enodebdata.Range("A2:F2, H2"), enodebdata.Range("A2:F2, H2").End(xlDown).Range("F2")).Select

The problem is it only selects Columns A to F and gives the following error:

Runtime error 424, Object required`.

What am I missing?

braX
  • 11,506
  • 5
  • 20
  • 33
aab
  • 1,643
  • 2
  • 13
  • 22

1 Answers1

2

Try Union.

Dim lrow As Long
lrow = enodebdata.UsedRange.Rows.Count

    Union(enodebdata.Range("A2:F" & lrow), enodebdata.Range("H2:H" & lrow)).Select
GMalc
  • 2,608
  • 1
  • 9
  • 16