dhalls_supsu
02-07-2012, 03:52 AM
Hi all,
Currently using "n" and "j" as identifier but this only works good if I have only 1 worksheet. Therefore, please kindly advice on how I can improve to accommodate different worksheet with different number of rows.
E.g: To print result at row275 on Sheet1
then print result at row150 on Sheet2
For n = 1 To 500
For j = 1 To 100
If CheckBox1 = True And Cells(n, j).Value = "***" Then
If ComboBox1.Value = "***" Then
r = n + 248
c = j
Cells(n + 247, j).Select
ElseIf ComboBox1.Value = "***" Then
r = n + 250
c = j
Cells(n + 249, j).Select
ElseIf ComboBox1.Value = "***" Then
r = n + 252
c = j
Cells(n + 251, j).Select
Help deeply appreciated.
Thanks in advance.
Currently using "n" and "j" as identifier but this only works good if I have only 1 worksheet. Therefore, please kindly advice on how I can improve to accommodate different worksheet with different number of rows.
E.g: To print result at row275 on Sheet1
then print result at row150 on Sheet2
For n = 1 To 500
For j = 1 To 100
If CheckBox1 = True And Cells(n, j).Value = "***" Then
If ComboBox1.Value = "***" Then
r = n + 248
c = j
Cells(n + 247, j).Select
ElseIf ComboBox1.Value = "***" Then
r = n + 250
c = j
Cells(n + 249, j).Select
ElseIf ComboBox1.Value = "***" Then
r = n + 252
c = j
Cells(n + 251, j).Select
Help deeply appreciated.
Thanks in advance.