Consulting

Results 1 to 2 of 2

Thread: Extract data into multiple cells

  1. #1

    Extract data into multiple cells

    I have a couple thousand cells with a combination of numbers 1 thorough 24. Example: Cell 1 may read "1, 3" and cell 2 may read "1, 2, 4, 6, 7, 10, 11, 15, 23, 22". I know there is a way to extract specific data from cells and insert it into another, but is there a code that would allow me to extract each number and place it into the appropriate cell? "1" in the first cell, "2" in the second, etc.

    I'm still new to VBA and playing around with the code hasn't been very fruitful. Any ideas? Thanks!

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    select the cells then maybe:
    Sub blah()
        Selection.TextToColumns DataType:=xlDelimited, ConsecutiveDelimiter:=True, Comma:=True, Space:=True
    End Sub
    ?
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Tags for this Thread

Posting Permissions

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