Your thoughts on sorting!

What am I doing wrong, here? I put a bunch of random numbers in column A, ran your code, and it... put the time in B1, and copied and pasted my numbers about 8000 rows down, without sorting anything. :nervous:

And now, trying again with different numbers,
Do Until Cells(PutMe, 3) = ""
is causing errors, because PutMe is greater than Rows.Count.
 
Last edited by a moderator:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Because they're formulas. The random part of the formula recalculated and became a new number after it was sorted.
 
Sorry, my bad. When I read random numbers, I assumed you meant a formula...
Yes, I know what I get when I assume.......

:(
 
Sorry, my bad. When I read random numbers, I assumed you meant a formula...
Yes, I know what I get when I assume.......

:(

You overlooked the obvious, if you will :wink:
Regardless, I can't get that sub even close to working, and I've tragically exhausted my time to play around - my data structure curiousity will have to go unsated for the day.
 
If you are trying to use the last thing Lewiy posted for the sort code. It is missing part of the sumproduct formula, looks possibly due to the < error?

Cells(c, 2).Formula = "=SUMPRODUCT(--(A1:A" & Limit & "<A" ?< & Limit ?),--(A1:A? c>
 
If you are trying to use the last thing Lewiy posted for the sort code. It is missing part of the sumproduct formula, looks possibly due to the < error?

I noticed it had issues in that line (hence the problem with PutMe being huge), I just couldn't figure out what.
 
Sorry, didn't check the post obviously, the SUMPRODUCT formula is:
Rich (BB code):
Rich (BB code):
Rich (BB code):
"=SUMPRODUCT(--(A1:A" & Limit & "<A" & c & "),--(A1:A" & Limit & "<>""""))"
 
A" & c & "),--(A1:A" & Limit & "<>""""))"

With a "less than" symbol between those two bits
 
Try putting it in php tags or putting a space before and after the <
 

Forum statistics

Threads
1,222,681
Messages
6,167,581
Members
452,120
Latest member
Luis_Macros

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top