When I enter values in column B, column B and A will be sorted after column B from the highest value to the lowest.
Is that possible?
When I enter values in column B, column B and A will be sorted after column B from the highest value to the lowest.
Is that possible?
Hi andrugrasu- Right-click on your Worksheet tab, select View Code, and paste this in the module that opens. Then press ALT+F11 to return to Excel:If you have headers in row 1, change "Header:=xlNo" to "Header:=xlYes".![]()
Please Login or Register to view this content.
Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee![]()
Last edited by leelnich; 05-31-2017 at 12:09 AM.
thanks, but i get this error
runtime 1004
te sort reference is not valid.
I modified code in Post #2. Copy now and try again.
Try
![]()
Please Login or Register to view this content.
WORKS.
But if I move the columns ... and suppose the two columns move in C4 and D4, what should I change in the code to work?
![]()
Please Login or Register to view this content.
jindon thxs, but after changing the values in column d, the sorting is done correctly but moves from c4: d4 the values in c1: d1. I would like to stay in c4: d4 after filtering.
Do you mean?
Otherwise, I need to see you workbook.![]()
Please Login or Register to view this content.
jindon
In the attachment is the file I want to apply your code to.
If you have the will to help me to the end it would be great.
I want the values in cell a136 to a141 in the "1.wip CONTROL REPORT (3)" to be sorted from the highest value to the smallest of cells b136 to b141.
* The values in cells b136 to b141 change according to the filter in the table head (laser).
If the values in b136 to b141 are ordered from highest to lowest, then the right graph is drawn correctly. If they are not ordered from the largest to the lowest, the chart does not display correctly.
Is the range fixed? like A136:A141? or you want expand it automatically when you add row(s) below?
If fixed
If flexible,![]()
Please Login or Register to view this content.
Attached used 2 nd code.![]()
Please Login or Register to view this content.
wow you are a genious...
A little observation that you can safely solve ...
If I filter in the table head "laser" value l2 ... because I have a zero value .. the filter from the largest to the smallest is not done correctly ... in rest it works perfectly and I used the code for a flexible domain.
Can you help me with this?
Thanks a lot in advance.
I owe you.
OOps.. the cells are formula, so Change event is not the one.
Can you replace the code with
This will execute when you select column "B" in the range.![]()
Please Login or Register to view this content.
you are the best!!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks