Results 1 to 4 of 4

Thread: VBA Programming in Excell to Perform Basic Function

  1. #1

    Question VBA Programming in Excell to Perform Basic Function



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi Experts,

    Subject: Action Item Spreadsheet(s)

    Here is the basic Excel set up.

    Column A, Status: Either "Open" or "Closed" will be written in these column cells. Any action items that are "Open" will need our attention and so we want them to go to the top of the spreadsheet . Any action items that have been dealt with as identified by the text "Closed" should drop to the bottom of the spreadsheet (after the list of Opens).

    Column B, Priority: Either "High," "Medium," or "Low" will be written in these column cells. We want these to be tied directly to the "Open" items in column A. So, we want the "Open" items to sort so that high goes at top, medium under the highs and lows under the mediums.

    There are also columns C, D, E etc, but we want the row data to all stay intact.

    I need your help.

  2. #2

    Here is the spreadsheet design

    Thank you for your help. I sure appreciate it.
    Attached Files Attached Files

  3. #3
    Acolyte millz's Avatar
    Join Date
    Aug 2013
    Location
    Singapore
    Posts
    32
    Articles
    0
    Hi Recepkendir, you don't need VBA to perform such simple sorting. You can perform below steps to sort them like what you wanted.

    1) your table is missing out Column A. Select cell B2, from Excel's ribbon menu, "Table Tools" design should appear, click on Resize Table on the extreme left, and change =$B$2:$G$32 to =$A$2:$G$32
    2) now select cell A2 and click on Data -> Sort, Excel should automatically highlight all data in the table and a dialog for sorting should appear
    3) under "Sort by", select "Status", and select "Z to A" order
    4) click on "Add Level", under "Then by", select "Priority", and under Order, select Custom List.
    5) "NEW LIST" should be highlighted by default, click on "Add", and type in "High", "Medium", "Low" on separate lines. Click OK, and OK again


    Edit: I am using Excel 2007, if you have a different version the steps may be different, I am not sure.

  4. #4

    Hooray!!

    Quote Originally Posted by millz View Post
    Hi Recepkendir, you don't need VBA to perform such simple sorting. You can perform below steps to sort them like what you wanted.

    1) your table is missing out Column A. Select cell B2, from Excel's ribbon menu, "Table Tools" design should appear, click on Resize Table on the extreme left, and change =$B$2:$G$32 to =$A$2:$G$32
    2) now select cell A2 and click on Data -> Sort, Excel should automatically highlight all data in the table and a dialog for sorting should appear
    3) under "Sort by", select "Status", and select "Z to A" order
    4) click on "Add Level", under "Then by", select "Priority", and under Order, select Custom List.
    5) "NEW LIST" should be highlighted by default, click on "Add", and type in "High", "Medium", "Low" on separate lines. Click OK, and OK again


    Edit: I am using Excel 2007, if you have a different version the steps may be different, I am not sure.
    Thank you so much!!! I followed your steps and it worked!!!

Posting Permissions

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