Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Help with a complicated For ... Each ... Next statement.

I want to use a For each cell in Range from E2 = BI2 to E7726 = BI7726 but
I only wabnt to do every other column. For instance:

For each c in Range("E2:E7726").Cells
Next c

For each c in Range("G2:G7726").Cells
Next c
..
..
..
For each c in Range("BI2:BI7726").Cells
Next c

My question is this, is there a way to write one For ... Each ... Next
statement that takes into account the every other column criteria? I don't
want to write 29 For ... Each ... Next statements.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Help with a complicated For ... Each ... Next statement.

Hi

Look at this:

For cOff = 0 To 28*2 Step 2
For Each c In Range("E2:E7726").Offset(0, cOff).Cells

Next c
Next

Regards,
Per

On 19 Aug., 23:10, Ayo wrote:
*I want to use a For each cell in Range from E2 = BI2 to E7726 = BI7726 but
I only wabnt to do every other column. For instance:

For each c in Range("E2:E7726").Cells
Next c

For each c in Range("G2:G7726").Cells
Next c
.
.
.
For each c in Range("BI2:BI7726").Cells
Next c

My question is this, is there a way to write one For ... Each ... Next
statement that takes into account the every other column criteria? I don't
want to write 29 For ... Each ... Next statements.


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
Complicated IF statement - desperately need some help Mark D[_2_] Excel Worksheet Functions 4 March 25th 10 09:34 PM
Complicated If Statement - I Think! Dee Excel Worksheet Functions 5 November 11th 08 03:00 PM
Complicated If Statement...? MeiLong Excel Worksheet Functions 4 February 12th 07 09:08 PM
Complicated If statement? aposatsk Excel Discussion (Misc queries) 0 August 3rd 06 06:50 PM
Complicated If Then / V Lookup / Match Statement... ryesworld Excel Worksheet Functions 17 December 10th 05 02:09 PM


All times are GMT +1. The time now is 12:14 PM.

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"