Consulting

Results 1 to 7 of 7

Thread: Solved: Uhh... Corresponding number detection and copying

  1. #1

    Post Solved: Uhh... Corresponding number detection and copying

    I have one workbook with a sheet named "Sheet1", and another workbook with a sheet named "Sheet2" In "Sheet1" I have a list of numbers in column A, such as 4, 3, 5, 6, 8, 9, 11, 10, etc. In "Sheet2" of the other workbook, there are corresponding numbers, also in column A. These, however, aren't nessecarily in order. In "Sheet2" in column AB there are numbers that correspond to the numbers in column A, e.g. The number in A57 would correspond to AB57.

    I need to copy the number in column AB of "Sheet2" (which corresponds to the number in the same row of column A on "Sheet2" and also corresponds to some row in column A of "Sheet1") and I need to paste it into "Sheet1" column B next to the corresponding number in column A.

    If that made sense to you, you're a genius, and I need your help. If you see any way I can clarify, please tell me.

    Help!

  2. #2
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    Here's an example using just one workbook. This would be very easy to change to more than one workbook if the ranges are static.



  3. #3
    Thanks so much! However, there's one problem. The name of the workbook has a comma in it (like "Example, 103"), so it messes up VLOOKUP. I can't change the file name.

    I guess I need either a VBA solution, or something else that I don't know.

    Thanks.

  4. #4
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    the comman doesn't matter b/c your workbook name will be enclosed in ' 's like 'my,workbook'sheet2!$A$1:$AB$35 . I didn't think you could put punctuation other than like _ 's in a file name. News to me!

  5. #5
    Thanks! One last question (I think). What's the column index number of BC (I thought it was AB, but I was wrong).

  6. #6
    Never mind. I figured it out (55).

    Thanks so much!

  7. #7
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    Columindex for AB is 28 on an array A:AB

Posting Permissions

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