Posts by jindon

    Hi,


    edited:


    =IF(ISERROR(SMALL(IF(NOT(ISERROR(SEARCH("x",$A$1:$A$200)=TRUE)),ROW($A$1:$A$200)),ROW(A1))),"",INDIRECT("A"&SMALL(IF(NOT(ISERROR(SEARCH("x",$A$1:$A$200)=TRUE)),ROW($A$1:$A$200)),ROW(A1))))


    holding down Ctrl+Shift and press Enter to get out from the formula bar


    then drag down

    Hi,


    Do you want to replace what is in 17th row on sheet2 with anything you w-click on sheet1? if it that is the case,


    Code
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
        Dim ws2 As Worksheet, lastA As Long
        Set ws2 = Sheets("Sheet2")
        With Target
            If .Column <> 1 Then Exit Sub
            Rows(.Row).Copy Destination:= _
            ws2.Rows("17")
        End With
        Set ws2 = Nothing
    End Sub

    Hi,


    OK,


    here's another way to paste.


    "Right click" on the sheet tub which you want the data to copy from and select "View code???", (i'm not sure the exact indication, but the bottom one), then paste the code in the blank on the right side.

    Hi,


    here's to test
    assuming cell A1 is included in the table area, if not, change "a1" to any cell name within the table area.


    Hi,


    I have checked you code and it worked as you expected.
    It looks fine to me.


    you can also validate with application.inputbox


    vInput = Application.InputBox("Please Write Your Item", "Add New Item", Type:=1)


    only accepts numbers.


    jindon

    Hi,


    here's how to set,


    1) Hit F11(Function11) key with holding down Alt key to open VB Editor
    2) W-click on the Sheet1 icon on the leftside
    3) Paste the code onto somewhere on the rightside
    4) HIt F11 with holding down Alt key again to get back to Excel


    then, if you w-click on any cell in column A contains value on sheet1, its value will be copied and pasted onto sheet2.


    hope it helps


    jindon

    Hi,


    if A2 value on sheet1 found, you want corresponding value on sheet2 to A4 on sheet1?



    Quote from pfeiffer

    I want to take the value of Bx (same number as the x in Ax) on sheet 2 and paste it in A3 on sheet 1.

    Hi,
    try this
    select the cell first then run this vba code
    regarding Test002:
    can you add following two lines just before End Sub
    Set ws1 = Nothing
    Set ws2 = Nothing

    Hi,


    try this



    hope it helps

    Hi,


    paste the code onto sheet module
    when you w-click on any cell in column A, its row will be copied and
    pasted in the first available row in Sheet2



    hoe it helps

    I'm really not sure if it works,


    Private Sub CommandButton1_Click()


    Do Until Sheets("Delivery Data").Cells(1, 1).Value = ""
    Sheets("Delivery Note").Range("A1:N37").PrintOut Copies:=1, Collate:=True
    With Sheets("Delivery Data")
    .Rows("1").ClearContents
    .Rows("2").Copy Destination:=.Rows("1")
    Application.CutCopyMode = False
    .Rows("2").Delete
    End With
    Loop
    End Sub