Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WHY NOT WORK? (2000 sr 1)

    i dont understand why this macro not work more??????????????????
    Acc..............

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

    Re: WHY NOT WORK? (2000 sr 1)

    What is the macro supposed to do?

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

    Re: WHY NOT WORK? (2000 sr 1)

    ok.
    If you see the colored line have a similar string in the column S the difference is only the first 2 character or 36 or 55, the remain part of index are the same.
    In this case make a controll on index S:
    If the index in S is the same but have a difference only in the first 2 character delete all line in question and insert to up the line that haev the index with 36....
    Example:
    the line 11 have the index in column S 55-05023-03400-274507
    the line 23 have the index in column S 36-05023-03400-274507

    delete this 2 line from L0785_TOTALE and insert up in the L0785_PAGATI the entire line with the suffix 36 (range A:S)

    Make a controll oin the max extension of line 65536....

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

    Re: WHY NOT WORK? (2000 sr 1)

    In column D, some of the values are "real" numbers and others are numbers stored as text. Excel sees those as different. It should work OK if you change the line

    If (Cells(n, 4) = Cells(n + 1, 4)) And Cells(n, 19) <> Cells(n + 1, 19) Then

    to

    If (Val(Cells(n, 4)) = Val(Cells(n + 1, 4))) And Cells(n, 19) <> Cells(n + 1, 19) Then

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

    Re: WHY NOT WORK? (2000 sr 1)

    great!!!!!!!!!!!!
    But for you, is important to ordering the line with the macro ORD_ASS before the macro PGATI?

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

    Re: WHY NOT WORK? (2000 sr 1)

    Yes, you should call ORD_ASS to sort the worksheet at the beginning of PAGATI, because the loop in the code compares a cell in column D (and in S) to the cell in the next row. This comparison is useless if the worksheet hasn't been sorted properly.

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

    Re: WHY NOT WORK? (2000 sr 1)

    Hans, but is possible controll the no duplicate with the index in column "S"...

    Example: if in the sheet L0785_pagati already existis a record with the same index "S" of L0785_totale skip and not insert up...

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

    Re: WHY NOT WORK? (2000 sr 1)

    The macro in your workbook always begins pasting at row 7of the Pagati sheet . That is, it overwrites previous results. Do you want it to append below previous results instead?

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

    Re: WHY NOT WORK? (2000 sr 1)

    Yes, ...

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

    Re: WHY NOT WORK? (2000 sr 1)

    If no record is added to L0785_PAGATI, should the records in L0785_TOTALE still be deleted?

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

    Re: WHY NOT WORK? (2000 sr 1)

    yes, delete always the 2 line with suffix 36 and 55 from L0785_totale but not insert up the line if already present in the L0785_pagati...

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

    Re: WHY NOT WORK? (2000 sr 1)

    See attached (zipped) workbook.

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

    Re: WHY NOT WORK? (2000 sr 1)

    Naturally, no WORDS!!!!!!
    Work SUPER ECCELLENT.....

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

    Re: WHY NOT WORK? (2000 sr 1)

    Hi Hans, Good morning...
    Similar this macro...
    Find from L0785_PAGATI if is present the index 36 an 55 (with the same characyeristic of attached macro, the famous difference from index is only 55 and 36 the remain value are the same)...
    Example:
    In the L0785_pagati is present the line with the index equal in to CDI_50 show msbox "attention alreday present in to CDI_50! & cell Q & cell A" (joined the value of the cells A and Q)

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

    Re: WHY NOT WORK? (2000 sr 1)

    Please explain PRECISELY what you want.
    - On which column or columns do you want to compare the worksheets?
    - What are the EXACT conditions on which you want to show a message box?

Page 1 of 2 12 LastLast

Posting Permissions

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