Consulting

Results 1 to 8 of 8

Thread: excel data manipulation and sorting

  1. #1
    VBAX Newbie
    Joined
    Jun 2008
    Posts
    5
    Location

    excel data manipulation and sorting

    I just started learning VBA yesterday but this is urgent and i have no
    clue as to how to do it.


    What i need to do is that
    1) Sort by column B so that the cells with numbers come out on top, it
    is a sort ascending function
    2) i need to find a way for visualbasic to know that i only want to
    select up to the last cell in column B that starts with numbers. I
    need to then take all of the cells from A1 until HX (where X is the
    row number of the last numerical B cell) and copy it and paste it to
    another workbook named withoutpos.xls
    3) i need to delete those rows i just copied in the original workbook
    4) in the workbook i copied to (withoutpos.xls) i need to sort row D
    ascending. i need visualbasic to look for the first blank cell in
    column D and take the cells in C starting from that row and
    continuing. (for example if column D has 13 filled cells and the 14th
    is empty, visualbasic will tell excel to move the contents of column C
    starting from C14, to column D starting with D14)
    5) Now i need to sort column F ascending. i need Excel to move all
    cells starting with "Email:" to column H
    6) Now i need to sort column G ascending. i need Excel to move all
    cells starting with "Email:" to column H
    7) Now i need to resort column G and move all of it's cells that are
    filled to column E
    8) i need to delete G now (what was formerly column H becomes column G
    now)
    9) FINALLY i need to have excel take all of the text following the
    second comma in column A cells and copy to column I (not H). If there
    is either "MD" or "DO" in the copied text i need them to go into
    column H
    Last edited by hgeek; 06-27-2008 at 09:00 AM.

  2. #2
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    228
    Location
    Hi There,

    What i need to do is that
    1) Sort by column B so that the cells with numbers come out on top, it
    is a sort ascending function
    2) i need to find a way for visualbasic to know that i only want to
    select up to the last cell in column B that starts with numbers. I
    need to then take all of the cells from A1 until HX (where X is the
    row number of the last numerical B cell) and copy it and paste it to
    another workbook named withoutpos.xls
    Column B in your examle file does not contain any numbers??

    Could you confirm which columns you are referring to and maybe show the result you are expecting on another sheet in you example file.

    Thanks

    Marshybid

  3. #3
    VBAX Newbie
    Joined
    Jun 2008
    Posts
    5
    Location
    sure. i am trying to compile a list of doctors in my fathers area. the real sheet is like this (the attached needhelp spreadsheet)

    i am trying to get a result like in worksheet resultcal . but result doesnt have the step 9 in it

  4. #4
    VBAX Newbie
    Joined
    Jun 2008
    Posts
    5
    Location
    is it impossible?

  5. #5
    VBAX Newbie
    Joined
    Jun 2008
    Posts
    5
    Location
    guys i really need help bad, is it possible for someone to do it?

  6. #6
    VBAX Tutor
    Joined
    Jan 2008
    Posts
    266
    Location
    it is possible, but i get so confused i hardly know my name anymore.

    A1 until Hx does that mean column A to H and row one to "last used row"?

    do you need withoutpos.xls? cant you just use a diffrent sheet?

    lets start with that.

  7. #7
    VBAX Newbie
    Joined
    Jun 2008
    Posts
    5
    Location
    sure i can use a different sheet
    and A1 until Hx does mean until the last used row. X reffers to the row

  8. #8
    VBAX Tutor
    Joined
    Jan 2008
    Posts
    266
    Location
    ok i got this far, 3 is "done" but not active.
    but i dont understand 4, i dont see what needs to be done

Posting Permissions

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