Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort and move macro
How would I set up a macro for a worksheet that varies in number of rows
daily, to sort a by dollar amount. Than for any dollar amount that equals $0.00 I would need to have those rows moved to another worksheet within the same workbook and than have specific columns removed from the new worksheet. Is this possible ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort and move macro
You would need to define the range you want to sort so that it includes all
of the columns and rows that contain data which you want kept tied to the dollar value. Then you would use the Sort method to sort that defined range, making the column (or row, depending upon which you are sorting) that contains the data to be sorted first as Key 1. You can have additional keys but I doubt that you need them for this execise. You also can set a parameter for ascending or descenting order. I would think that ascending would be appropriate for your purposes. Then you would need a loop to look at the values and for each value that equals 0.00, you can delete it, or copy it and paste it somewhere. That's about it. "Jen_T" wrote in message ... How would I set up a macro for a worksheet that varies in number of rows daily, to sort a by dollar amount. Than for any dollar amount that equals $0.00 I would need to have those rows moved to another worksheet within the same workbook and than have specific columns removed from the new worksheet. Is this possible ? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort and move macro
I am not fluent at writing macros, is there a possibility of sending me a
macro to fo this? "JLGWhiz" wrote: You would need to define the range you want to sort so that it includes all of the columns and rows that contain data which you want kept tied to the dollar value. Then you would use the Sort method to sort that defined range, making the column (or row, depending upon which you are sorting) that contains the data to be sorted first as Key 1. You can have additional keys but I doubt that you need them for this execise. You also can set a parameter for ascending or descenting order. I would think that ascending would be appropriate for your purposes. Then you would need a loop to look at the values and for each value that equals 0.00, you can delete it, or copy it and paste it somewhere. That's about it. "Jen_T" wrote in message ... How would I set up a macro for a worksheet that varies in number of rows daily, to sort a by dollar amount. Than for any dollar amount that equals $0.00 I would need to have those rows moved to another worksheet within the same workbook and than have specific columns removed from the new worksheet. Is this possible ? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort and move macro
You would have to provide a lot more information than you have done in this
posting. I could write a macro that will perform the actions that you specified, but it would most likely not work in your workbook since I cannot see where your data is, have no idea how you have your headers set up, do not know which sheet contains what data and a few other things. I think it might be better if you try to learn a little more about how it works and try to record some of your own macros. Then when you post, you will have a better idea of what you need to provide to get some real help. "Jen_T" wrote: I am not fluent at writing macros, is there a possibility of sending me a macro to fo this? "JLGWhiz" wrote: You would need to define the range you want to sort so that it includes all of the columns and rows that contain data which you want kept tied to the dollar value. Then you would use the Sort method to sort that defined range, making the column (or row, depending upon which you are sorting) that contains the data to be sorted first as Key 1. You can have additional keys but I doubt that you need them for this execise. You also can set a parameter for ascending or descenting order. I would think that ascending would be appropriate for your purposes. Then you would need a loop to look at the values and for each value that equals 0.00, you can delete it, or copy it and paste it somewhere. That's about it. "Jen_T" wrote in message ... How would I set up a macro for a worksheet that varies in number of rows daily, to sort a by dollar amount. Than for any dollar amount that equals $0.00 I would need to have those rows moved to another worksheet within the same workbook and than have specific columns removed from the new worksheet. Is this possible ? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort and move macro
ALL data is located on Sheet1! titled "Accounts", header row is first row. column J is the column I need to reference to see if the dollar amount is $0.00 or blank ,f TRUE Than I would need to have the entire row cut and pasted into a new worksheet withon the same workbook titled "No Interest" . Once that loop is complete,where the macro looks for all rows in the "Accounts' worksheet where the conditon above was TRUE I would need the macro to remove columns J, K, L, and M on the "No Interest" worksheet. I hope this is enough information, I have tried to record and am having a hard time understand how to get a macro to look at all rows on a worksheet and other misc items. I am trying, but just a beginner. Any help would be greatly appreciated. Thank you "JLGWhiz" wrote: You would have to provide a lot more information than you have done in this posting. I could write a macro that will perform the actions that you specified, but it would most likely not work in your workbook since I cannot see where your data is, have no idea how you have your headers set up, do not know which sheet contains what data and a few other things. I think it might be better if you try to learn a little more about how it works and try to record some of your own macros. Then when you post, you will have a better idea of what you need to provide to get some real help. "Jen_T" wrote: I am not fluent at writing macros, is there a possibility of sending me a macro to fo this? "JLGWhiz" wrote: You would need to define the range you want to sort so that it includes all of the columns and rows that contain data which you want kept tied to the dollar value. Then you would use the Sort method to sort that defined range, making the column (or row, depending upon which you are sorting) that contains the data to be sorted first as Key 1. You can have additional keys but I doubt that you need them for this execise. You also can set a parameter for ascending or descenting order. I would think that ascending would be appropriate for your purposes. Then you would need a loop to look at the values and for each value that equals 0.00, you can delete it, or copy it and paste it somewhere. That's about it. "Jen_T" wrote in message ... How would I set up a macro for a worksheet that varies in number of rows daily, to sort a by dollar amount. Than for any dollar amount that equals $0.00 I would need to have those rows moved to another worksheet within the same workbook and than have specific columns removed from the new worksheet. Is this possible ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pictures don't move when I sort list | Excel Worksheet Functions | |||
Help: sort data and move to a new sheet | Excel Programming | |||
don't move formats on sort | Excel Discussion (Misc queries) | |||
Sort data and move to next 5 column | Excel Programming | |||
Sort data and move to next column | Excel Programming |