Sort Columns Appropriately
Sort Columns Appropriately
Last edited by Tmc2159; 06-12-2012 at 06:13 PM.
Tmc2159,
Welcome to the Excel Forum.
Step 1:
I want to delete any row which has the words "Not Given." in Column J.
Step 2:
I want to sort all the Rows by the date given in Column C.
Step 3:
I want to arrange the Number together.
Meaning all the Mach 1 should be together and Mach 2 should be together if they have the same date.
Step 4:
I want to skip a line when the date changes.
Step 5 ( Optional):
I would like my different dates to be seperated in different sheets but that probably can not be done in excel.
All of the above is doable.
When we create the new worksheets for the dates in column C, Excel will not allow us to use this format "5/2/2012" (we can not use the / character in a sheet name.
We could use 5-2-2012. Is this acceptable?
Can you supply another Template.xlsx file, containing the same Data worksheet, and containing (manually formatted by you) what the worksheet for the date "5-2-2012" will look like (titles, data from worksheet Data, etc.)?
And, can we have another worksheet Temp, that will show us what worksheet Data will look like after the macro?
Have a great day,
Stan
Windows 10, Excel 2007, on a PC.
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
Try the code below, which should take you up to the optional item. It is doable but it's a bit late/early here for me to mess with it today.
P.S. turn your filter off before running the code.
Please Login or Register to view this content.
If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved
Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown
Tmc2159,
Detach/open workbook Template_Tmc2159_EF837368_SDG15.xlsm and run the UpdateCreateSheets macro.
If you want to use the macro on another workbook:
Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).
1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
2. Open your workbook
3. Press the keys ALT + F11 to open the Visual Basic Editor
4. Press the keys ALT + I to activate the Insert menu
5. Press M to insert a Standard Module
6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
7. Press the keys ALT + Q to exit the Editor, and return to Excel
8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.
Please Login or Register to view this content.
Before you use the macro with Excel 2007 or newer, save your workbook, Save As, a macro enabled workbook with the file extension .xlsm
Then run the UpdateCreateSheets macro.
Thank you so much for all the help !!!
I never expected people to be so willing to help. This already saves me hours of work which for a small business is just so valuable.
If possible I would like to ask one more question.
I was unclear about what I am doing and decided it would be easier to just attach a template of work I have done by hand. I made it smaller so that it was easier to understand what i am doing. (deleted some entires normally these have about 1500 entries).
I want to go from the first sheet to the second using a macro automatically as I currently do this by hand.
However i want the lines for which the equipment is not running to be automatically not to appear on the second sheet.
Tmc2159,
OK, now we have six steps to the macro.
Step 1: I want to delete any row which has the words "Not Given." in Column J.
Step 2: I want to sort all the Rows by the date given in Column C.
Step 3: I want to arrange the Number together. Meaning all the Mach 1 should be together and Mach 2 should be together if they have the same date.
Step 4: I want to skip a line when the date changes.
Step 5: I would like my different dates to be seperated in different sheets but that probably can not be done in excel.
Step 6: However i want the lines for which the equipment is not running to be automatically not to appear on the second sheet.
Are the above six steps correct?
Changed Question My fault End of this Thread
Last edited by Tmc2159; 06-12-2012 at 06:14 PM.
Tmc2159,
So, you want to go just from sheet Data to Sheet1?
What ever happened to a separate sheet for each date?
Your latest template shows Sheet1 with "Equipment Not Running." rows.
And, the data is not sorted by date, and then by the "Mach's"?
We need another template that shows Sheet1 correctly.
Last edited by stanleydgromjr; 06-12-2012 at 12:13 PM.
Sorry for the confusion,
We are trying to go from Sheet1 to Data, not the other way around.
The seperate sheet was great and worked perfectly so I don't need anything else with it.
Sheet1 is the beginning, Data should be the Product.
I think this is where the confusion came from: " Sheet1 is the beginning, Data should be the Product. "
Not Given. and Equipment not running. are two ways to say the same thing.
Newer documents like the ones I want to use the macro on, will say Equipment Not running. Sorry for the confusion, I had not noticed the change myself !
Thanks again.
I am not sure whether my reply went through. It doesn't appear on my screen so I will answer #8 again.
We want to go from Sheet1 to Data (Sorry for the confusion).
Seperate Sheet for each data worked great, so I don't need any more work with that one.
Equipment Not running. = Not Given., I hadn't noticed they updated that but I managed to change it so that it deletes Equipment Not Running. rows !
You will find that in "data", the data is sorted by date and Mach's.
I think the confusion came from the fact that you go from Sheet1 to Data and not the other way around.
Tmc2159,
I am totally confused from all the changes you have gone thru.
In the Quick Reply box, just put the word BUMP. Then, click on the Post Reply button, and someone else will assist you.
Issue was Solved
Last edited by Tmc2159; 06-12-2012 at 06:14 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks