Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Extarct line from all sheets... (2000 sr 1)

    Assumnig i have this wbook with many sheets (into offical wbook the sheets are 52 and all are named with a number with 4 digit, exalude from the request macro the L0747 and MENU not are important for the project)

    My problem:

    Into column P of each sheets are present a value.

    I would want to extract all line from all sheets (without delete the source lines and maintain into sheets) where is present a value into column P and put all lines with condition into a template sheet named RICHIESTE (use the template L0747 and rename RICHIESTE before the copy)


    Note:
    Not delete L0747 i use thsi sheet from another macro.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Extarct line from all sheets... (2000 sr 1)

    Sal,

    By now you have had an enormous amount of assistance from this forum. We have written all kinds of macros for you. By now, you should be able to write this macro yourself. The methods you need are not essentially different from those that have already been written for you.
    We can help you with new methods, but it is not reasonable to expect the Lounge to do your work for you.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Birmingham, West Midlands, United Kingdom
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extarct line from all sheets... (2000 sr 1)

    Well said, Hans.

  4. #4
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extarct line from all sheets... (2000 sr 1)

    hi my freind.. i am very sorry for this request.

    I accept your comment as a suggestion.
    Sorry. I respect always your comment if not are also refered to Excel.;-)
    After 2 hour and various copy and paste from my old macro (you macro) i ahve arranged this, wath you think?:

    Sub RICHIESTE_DA_A_K_E_DA_P_L()

    Dim lRowTo As Long, lRow As Long
    Dim WS As Worksheet, wsTo As Worksheet

    Set wsTo = Sheets("RICHIESTE")
    lRowTo = wsTo.Range("P65536").End(xlUp).Row 'PRIMA LINEA DI RICHIESTE

    For Each WS In ActiveWorkbook.Worksheets

    '** CONTROLLO SE 4 DIGIT NEL NOME SHEET **

    If Len(WS.Name) = 4 And IsNumeric(WS.Name) Then

    For lRow = 3 To WS.Range("P65536").End(xlUp).Row
    If WS.Range("P" & lRow).Text <> "" Then
    lRowTo = lRowTo + 1
    wsTo.Range("A" & lRowTo & ":K" & lRowTo).Value = _
    WS.Range("A" & lRow & ":K" & lRow).Value
    wsTo.Range("L" & lRowTo).Value = WS.Range("P" & lRow).Value
    End If
    Next lRow
    End If
    Next WS
    End Sub

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Extarct line from all sheets... (2000 sr 1)

    Looks good. Have you tested it on (a copy of) your workbook?

  6. #6
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Extarct line from all sheets... (2000 sr 1)

    Yes, work... Fine for me.

Posting Permissions

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