PDA

View Full Version : Print result in different worksheet with different number of rows



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.

Bob Phillips
02-07-2012, 03:59 AM
Your request is not clear. There is nothing in that code about worksheets, nor does your explanation does not show what you want.

dhalls_supsu
02-07-2012, 06:53 PM
Sorry about the vague request.
Attached is the excel file.

Short note on the file: because we deal with different number of sub contractors every year(as you can see from the file). Therefore I'm tasked to create a macro to allow endorsement of the 3 person in-charge for each month.

Problem is using my current codes, i'm having trouble displaying out the date of endorsement on sheet1. Hence therefore requesting help from you guys. :help

There will be another attachment on another post for the chops of the person in-charge.

dhalls_supsu
02-07-2012, 06:54 PM
cont from above post.