Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm having problems getting David McRitchie's pushdown macro to work
correctly. I've worked through the code and changed some "<" to be "", and vice-versa, achieving some minimal success doing this, however I still cannot get the desired results. Can anyone tell me why this code isn't working correctly??? The pushdown macro can be found at: http://www.mvps.org/dmcritchie/excel/pushdown.htm Thanks in advance!!! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How is it not working?
|
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
When I run it through exactly as it is posted online it ends up sorting
the data correctly, however the pushdown part of the macro does not work correctly and instead it ends up only adding one blank row under the title row. Seeing that it wasn't working properly I tried to troubleshoot by changing: UCase(Cells(r, c).Value) < UCase(val) Then to: UCase(Cells(r, c).Value) < UCase(val) Then under the "Find lowest value in a row" section of the code. This allowed val to be set to the correct value (or so I believe), so after some more troubleshooting I changed a similar line in the "if not the lowest value in row push down values in column" section in a similar fashion. By doing this the macro will actually "push down" the data, however I still cannot get it to work as it is said to work (???). I truly believe this is something simple, but I just cannot get the code that's posted to work correctly. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry, I changed:
UCase(Cells(r, c).Value) < UCase(val) Then to: UCase(Cells(r, c).Value) UCase(val) Then (just changed the "<" to "") |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Why do you need to change it at all? What doesn't it do that you want?
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) wrote in message ups.com... I'm having problems getting David McRitchie's pushdown macro to work correctly. I've worked through the code and changed some "<" to be "", and vice-versa, achieving some minimal success doing this, however I still cannot get the desired results. Can anyone tell me why this code isn't working correctly??? The pushdown macro can be found at: http://www.mvps.org/dmcritchie/excel/pushdown.htm Thanks in advance!!! |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I only modified it in an attempt to get it to work correctly. I just
want the code to work as it says that it will work. Thanks for everyone's help so far, & I'm trying to be as descriptive as possible. The major error is that the code posted by David McRitchie is not working for me. |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It works just as advertised as far as I can see.
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) wrote in message ups.com... I only modified it in an attempt to get it to work correctly. I just want the code to work as it says that it will work. Thanks for everyone's help so far, & I'm trying to be as descriptive as possible. The major error is that the code posted by David McRitchie is not working for me. |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If I paste the pushdown code exactly as it is posted on his webpage in
a module, all his code does for me is sort each column of data and insert a cell in Row 2 of each Column, leaving Row 2 as a blank row. Absolutely no offense, but you're saying that you can do the same thing and it works correctly for you??? What could be going wrong when I run the macro to cause the previously mentioned results??? |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I stepped through it again. Essentially, after the code sets val =
too_high, the value for val never is reassigned to the lowest value in the row. Due to this, when the code asks "If val = too_high", val still does equal too_high, so the macro is prompted to finish. And the cells are added in Row 2 because the code as written inserts a Cell if (r,c).Value val, which in 99.9% of cases that will be true. Any help I've previously received is greatly appreciated, however I still don't see how the code as posted can work correctly (???). |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't know Brian. What does your data look like?
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) wrote in message ups.com... If I paste the pushdown code exactly as it is posted on his webpage in a module, all his code does for me is sort each column of data and insert a cell in Row 2 of each Column, leaving Row 2 as a blank row. Absolutely no offense, but you're saying that you can do the same thing and it works correctly for you??? What could be going wrong when I run the macro to cause the previously mentioned results??? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Editing a simple macro | Excel Worksheet Functions | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) |