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
  • 10,905
  • 5
  • 18
  • 32
aab
  • 1,533
  • 2
  • 11
  • 20

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,558
  • 1
  • 8
  • 16