Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default check blocks in loop

Hi,

In a spreadsheet i want to check different sections for the presence of
value.

These sections are declared as block1, block2 .... block9.

Now I want a routine that loops through all 9 secioins or blocks where 1 is
raised to 2, 2 is raised to 3 etc.8 is raised to 9.

I this possible?

--
||//////||
( o o )
( O )
-
( )
( )
(______O______)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default check blocks in loop

Not really clear but maybe

For each cell in block1
'do something
Next cell

For each cell in block2
'do something
Next cell

'etc.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"sybmathics" wrote in message
ll.nl...
Hi,

In a spreadsheet i want to check different sections for the presence of
value.

These sections are declared as block1, block2 .... block9.

Now I want a routine that loops through all 9 secioins or blocks where 1

is
raised to 2, 2 is raised to 3 etc.8 is raised to 9.

I this possible?

--
||//////||
( o o )
( O )
-
( )
( )
(______O______)




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default check blocks in loop


"Bob Phillips" wrote in message
...
Not really clear but maybe

For each cell in block1
'do something
Next cell

For each cell in block2
'do something
Next cell

'etc.

--
HTH

Bob Phillips


Thanks Bob for your quick reply.

What I'm looking for is something like

for counter is 1 to 9
for each cell in block&counter
do something
next cell
next counter

But the concatenation does not work.
There doesn't appear to be 1 string created because vba adds a space.

Maybe a bit clearer?

Any help is greatly appreciated.

greets

Sybmathics


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default check blocks in loop

If your blocks are named ranges:

sub LoopBlocks
dim i as integer
dim rBlock as range

for i = 1 to 9
set rBlock = Range("block" & i)
<do something with rBlock
next i

end sub

HTH
--
AP

"sybmathics" a écrit dans le message de news:
...
Hi,

In a spreadsheet i want to check different sections for the presence of
value.

These sections are declared as block1, block2 .... block9.

Now I want a routine that loops through all 9 secioins or blocks where 1
is raised to 2, 2 is raised to 3 etc.8 is raised to 9.

I this possible?

--
||//////||
( o o )
( O )
-
( )
( )
(______O______)



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default check blocks in loop

Yes,

I see what you mean.

This one will certainly take me further.

Thanks a lot .

Cheers everybody!!

Sybmathics




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
Numbering in blocks on 5 Jason Excel non guru Excel Discussion (Misc queries) 4 July 14th 09 08:25 AM
counting blocks of 1's Bryan De-Lara Excel Worksheet Functions 10 February 18th 08 07:11 AM
averaging particular blocks of data robert111 Excel Discussion (Misc queries) 6 July 12th 06 02:41 PM
Loop or condition? To check down the rows KH_GS Excel Programming 4 March 29th 06 09:42 AM
Create a Loop to check cells between workbooks No Name Excel Programming 0 September 16th 04 04:35 PM


All times are GMT +1. The time now is 02:55 AM.

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

About Us

"It's about Microsoft Excel"