VBA Programming in Excell to Perform Basic Function

recepkendir1

New member
Joined
Aug 13, 2013
Messages
3
Reaction score
0
Points
0
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.
 

recepkendir1

New member
Joined
Aug 13, 2013
Messages
3
Reaction score
0
Points
0
Here is the spreadsheet design

Thank you for your help. I sure appreciate it.
 

Attachments

  • List 22.xlsx
    19.1 KB · Views: 20

millz

New member
Joined
Aug 6, 2013
Messages
32
Reaction score
0
Points
0
Location
Singapore
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.
 

recepkendir1

New member
Joined
Aug 13, 2013
Messages
3
Reaction score
0
Points
0
Hooray!!

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!!!
 
Top