Consulting

Results 1 to 4 of 4

Thread: Print result in different worksheet with different number of rows

  1. #1

    Print result in different worksheet with different number of rows

    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

    [VBA]
    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
    [/VBA]

    Help deeply appreciated.
    Thanks in advance.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Your request is not clear. There is nothing in that code about worksheets, nor does your explanation does not show what you want.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    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.

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

  4. #4
    cont from above post.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •