![]() |
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______) |
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______) |
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 |
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______) |
check blocks in loop
Yes,
I see what you mean. This one will certainly take me further. Thanks a lot . Cheers everybody!! Sybmathics |
All times are GMT +1. The time now is 08:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com