Posts by hn.rocket

    Re: Copy items w/multiple qty from 1 sheet to individual lines in another sheet


    Hi,


    I changed this section:


    Code
    Range("A" & rowcount_no2).Offset(1, 0).EntireRow.select
    selection.paste


    to this:

    Code
    Range("A" & rowcount_no2).Offset(1, 0).EntireRow.PasteSpecial xlPasteValues


    And the pasting of the first sku-1 works then it stops, and I get an error (error_2 attached) here:


    Code
    ' select the entire row in new sheet and copy it according to qty_count
    [B]    c1.EntireRow.Select[/B]
        Selection.Copy

    Hi,


    I'm trying to copy items from sheet 5 on single lines in sheet 6 based on qty value.


    e.g


    sheet5:

    sku-2 2


    sheet6 should have:


    sku-2
    sku-2


    But I'm getting an error at this line(attached):


    selection.paste





    Thank you for any assistance you guys can provide.



    Re: Problem with code for Clearing Content in Column Using User Input


    Hi jproffer.



    Thanks for the reply. That didn't work.. It's quite baffling why the code works if I explicitly put in the value, yet the Variable doesn't work.
    Other suggestions would appreciate it.
    James.


    Quote from jproffer;603958

    CountA only counts non-blank cells, so if there are blanks in that column the loop won't go all the way to the bottom. That may not be an issue in this case, but try this and see:



    If that don't work, post your workbook and someone might see something else causing your troubles.

    Hi,


    Problem: The code runs, but does not clear the value entered in the inputbox, not sure what's wrong


    This works if I take out the DelValue in this line and insert the value such as


    [TABLE="width: 70"]

    [tr]


    [TD="width: 70, align: right"]200007649[/TD]

    [/tr]


    [/TABLE]


    If Cells(i, 2).Value = DelValue Then Cells(i, 2).ClearContents


    The code runs without errors, but does not clear the contents



    Sample Data for col 2


    [TABLE="width: 70"]

    [tr]


    [td]

    order_nr

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]200007649[/TD]

    [/tr]


    [tr]


    [TD="align: right"]200008649[/TD]

    [/tr]


    [tr]


    [TD="align: right"]200009649[/TD]

    [/tr]


    [tr]


    [TD="align: right"]200006649[/TD]

    [/tr]


    [tr]


    [TD="align: right"]200006649[/TD]

    [/tr]


    [tr]


    [TD="align: right"]200004649[/TD]

    [/tr]


    [/TABLE]



    Thank You in Advance
    James