I have a column of data (column P). The data contains names every 12 cells, and has other data in between. I need to select only the cells containing names. The entire range of names and data moves down as the report is filled which is why I need the offset function.Here is what I've come up with so far. It selects the range of the 2 cells and the data between. I want it to select only the 2 cells. There will be numerous others as well within column P. If it were just the 2, then id just set 2 variables. I need it to select (for example) cell P2, P14, P26, P38. But this will change quite often to other rows in column P.
Dim nameBank As Range
Dim P As Range
Set P = Cells(Rows.Count, "P").End(xlUp)
Set nameBank = Range(P.Offset(-11), P.Offset(-23))

Range(Cell1, Cell2)returns a range object that encompasses theareabetweenCell1andCell2.Unionmethod to combine two or more ranges object.Microsoft documentation: