Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Mixing For i = x to y and j = z to y for lines and columns

hello, this morning I have been explained how to use For expression for
columns definitions, but I am trying without success to mix it with For
expression for lines.
Right now code looks like
______________
Sub TEST
For i = 4 To 32 Step 1
For j = 3 To 6
If Worksheets("Skew Matrix").Range(Columns(j) & i).Value = "" And CODE
Next i
Next j
End Sub
_______________
Not working!
I was before that writing

If Worksheets("Skew Matrix").Range("C" & i).Value = "" And CODE

and I do not want to repeat it for every columns...
help??
many thanks!
Daniel

  #2   Report Post  
Posted to microsoft.public.excel.programming
mcg mcg is offline
external usenet poster
 
Posts: 18
Default Mixing For i = x to y and j = z to y for lines and columns


napisal(a):
hello, this morning I have been explained how to use For expression for
columns definitions, but I am trying without success to mix it with For
expression for lines.
Right now code looks like
______________
Sub TEST
For i = 4 To 32 Step 1
For j = 3 To 6
If Worksheets("Skew Matrix").Range(Columns(j) & i).Value = "" And CODE
Next i
Next j
End Sub
_______________
Not working!
I was before that writing

If Worksheets("Skew Matrix").Range("C" & i).Value = "" And CODE

and I do not want to repeat it for every columns...
help??
many thanks!
Daniel



try to change Range(Columns(j) & i)
into cells(i,j)
mcg

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Mixing For i = x to y and j = z to y for lines and columns

Sub TEST
For i = 4 To 32 Step 1
For j = 3 To 6
If Worksheets("Skew Matrix").Cells(i,j).Value = "" then

End if
Next i
Next j
End Sub

--
Regards,
Tom Ogilvy

" wrote:

hello, this morning I have been explained how to use For expression for
columns definitions, but I am trying without success to mix it with For
expression for lines.
Right now code looks like
______________
Sub TEST
For i = 4 To 32 Step 1
For j = 3 To 6
If Worksheets("Skew Matrix").Range(Columns(j) & i).Value = "" And CODE
Next i
Next j
End Sub
_______________
Not working!
I was before that writing

If Worksheets("Skew Matrix").Range("C" & i).Value = "" And CODE

and I do not want to repeat it for every columns...
help??
many thanks!
Daniel


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Mixing For i = x to y and j = z to y for lines and columns

Many thanks,
it seems ok, I have a small problem, but I should be able to sort it
Many thanks, I know understand the logic, what is always greater than
to find the solution!
regards
Daniel
Tom Ogilvy wrote:
Sub TEST
For i = 4 To 32 Step 1
For j = 3 To 6
If Worksheets("Skew Matrix").Cells(i,j).Value = "" then

End if
Next i
Next j
End Sub

--
Regards,
Tom Ogilvy

" wrote:

hello, this morning I have been explained how to use For expression for
columns definitions, but I am trying without success to mix it with For
expression for lines.
Right now code looks like
______________
Sub TEST
For i = 4 To 32 Step 1
For j = 3 To 6
If Worksheets("Skew Matrix").Range(Columns(j) & i).Value = "" And CODE
Next i
Next j
End Sub
_______________
Not working!
I was before that writing

If Worksheets("Skew Matrix").Range("C" & i).Value = "" And CODE

and I do not want to repeat it for every columns...
help??
many thanks!
Daniel



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
mixing zip with zip+4 and then sorting JWCrosby Excel Discussion (Misc queries) 2 September 25th 08 08:48 PM
mixing up a list dkb43 Excel Discussion (Misc queries) 1 August 6th 08 08:20 PM
Mixing up the arguments michaelr586 Excel Worksheet Functions 2 September 24th 05 09:54 AM
mixing of vba and sumproduct Gixxer_J_97[_2_] Excel Programming 5 July 16th 05 12:58 PM
Mixing chart types E Halliday Charts and Charting in Excel 2 May 16th 05 01:43 PM


All times are GMT +1. The time now is 06:59 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"