Thanks Thanks:  0
Likes Likes:  0
Results 1 to 8 of 8

Thread: Need to grab data from one workbook , move to another

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    362
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a workbook named "Production Inventory". This workbook has a series of serial numbers in Column L and a series of PO#'s in column B. In my second workbook named "Master List", I have all of the serial numbers (from Production Inventory column L)listed in column B.

    I need to grab the PO#'s from Production Inventory column B and match them to the appropriate serial numbers in Master List column B. The PO#'s will be deposited into column S on Master List. (BTW, the serial numbers on Master List are no longer in the order per Production Inventory).

    Any ideas?

    Thx,
    Noir

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello Noir

    Look if this code will work for you

    Sub TotalValues()
    NxtVal:
    Total = 0
    On Error GoTo NoVal 'The value is not in Column A
    A_Val = Application.InputBox("Value to Find in Column A")
    If A_Val = False Then Exit Sub
    B_Val = Range("A1:A6").Find(What:=A_Val, _
    LookAt:=xlWhole).Offset(0, 1).Value
    On Error GoTo NoSpace 'The value in Column B does not contain a space StrippedVal = Left(B_Val, WorksheetFunction.Find(" ", B_Val) - 1) On Error GoTo NoSpaceInList 'Some values in list may not contain a space
    For Each thing In Range("B1:B6")
    If Left(thing.Value, WorksheetFunction.Find(" ", thing.Value) - 1) _
    = StrippedVal Then Total = Total + Cells(thing.Row, 3)
    NoSpaceInList:
    Resume ChkAgn
    ChkAgn:
    Next
    GoTo Done
    NoSpace:
    StrippedVal = B_Val
    Total = Range("B1:B6").Find(What:=B_Val, _
    LookAt:=xlWhole).Offset(0, 1).Value
    Resume Done
    Done:
    MsgBox "The Total For " & StrippedVal & " Is " & Total
    GoTo NxtVal
    NoVal:
    MsgBox "Sorry, That Value Is Not Listed"
    Resume NxtVal
    End Sub

    If it does not work for you,,,,,,mail me



  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    362
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Gareth,
    Thanks for the code but, i am not familiar enough with code to be able to tell if i can use it or not.

    Noir

  4. #4
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Glad to be of assistance to you Noir

    Just shout if you need more help

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Another thing Noir

    Dont forget to manipulate the code so you can use it to fit in your worksheet (Need help)

  6. #6
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Another thing Noir

    Dont forget to manipulate the code so you can use it to fit in your worksheet (Need help)

  7. #7
    Board Regular
    Join Date
    Apr 2002
    Location
    Cape Town,South Africa
    Posts
    234
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If you need to contact me my profile is on page 117 on top

    That's where you will find my history

    Contact me please

  8. #8
    Board Regular
    Join Date
    Mar 2002
    Posts
    362
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes Gareth, i will definitely need help manipulating your code to my requirements.

    Thx,
    Noir

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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