How do I change columns inside a range?

L

LongBeachGuy

I need Range("B:B") to change to Range("D:D"), Range("F:F"), and so.
I need the "Next_line" to be 2 when the next column is selected.


Next_Line = Application.CountA(Range("b:b"), NumColumns)

I want to do:
Next_Col = 0

' Then when the next column comes:

Next_Col = Next_Col + 2
Next_Line = Application.CountA(Range("Next_Col:Next_Col"),
NumColumns)

How do I do this?

Jose
 
L

Leith Ross

I need Range("B:B") to change to Range("D:D"), Range("F:F"), and so.
I need the "Next_line" to be 2 when the next column is selected.

Next_Line = Application.CountA(Range("b:b"), NumColumns)

I want to do:
Next_Col = 0

' Then when the next column comes:

Next_Col = Next_Col + 2
Next_Line = Application.CountA(Range("Next_Col:Next_Col"),
NumColumns)

How do I do this?

Jose

Hello Jose,

Like this...

Next_Col = Next_Col + 2
Next_Line = Application.CountA(Cells(1, Next_Col).EntireColumn,
NumColumns)

Sincerely,
Leith Ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top