PC Review


Reply
Thread Tools Rate Thread

How do I change columns inside a range?

 
 
LongBeachGuy
Guest
Posts: n/a
 
      17th Oct 2007
I need Range("B:B") to change to Range("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

 
Reply With Quote
 
 
 
 
Leith Ross
Guest
Posts: n/a
 
      17th Oct 2007
On Oct 16, 7:41 pm, LongBeachGuy <crnet...@yahoo.com> wrote:
> I need Range("B:B") to change to Range("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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change code to look at a range of columns not a single column BeSmart Microsoft Excel Programming 2 7th Mar 2010 01:16 PM
select range in column, calculate on range plus 3 columns, output inrange plus 7 columns ppeer Microsoft Excel Programming 8 11th Feb 2010 09:14 PM
writing values of a range inside a range sloth Microsoft Excel Programming 7 3rd Oct 2006 03:14 AM
Change Rows/Columns in range??? 43fan Microsoft Excel Programming 9 1st Apr 2004 02:05 PM
Can't change any properties of range object from inside a function dienkwik Microsoft Excel Discussion 6 12th Mar 2004 04:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:24 AM.