Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
mixing zip with zip+4 and then sorting | Excel Discussion (Misc queries) | |||
mixing up a list | Excel Discussion (Misc queries) | |||
Mixing up the arguments | Excel Worksheet Functions | |||
mixing of vba and sumproduct | Excel Programming | |||
Mixing chart types | Charts and Charting in Excel |