Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default How do I change columns inside a range?

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default How do I change columns inside a range?

On Oct 16, 7:41 pm, LongBeachGuy wrote:
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAN YOU CREATE COLUMNS INSIDE A TEXT BOX Raffa Excel Discussion (Misc queries) 1 June 1st 07 02:15 AM
writing values of a range inside a range sloth Excel Programming 3 October 3rd 06 03:14 AM
Change cells inside a function No Name Excel Programming 1 March 1st 06 12:32 PM
Change Rows/Columns in range??? 43fan Excel Programming 0 April 1st 04 02:05 PM
Change Rows/Columns in range??? 43fan Excel Programming 0 April 1st 04 02:05 PM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"