Тёмный

How to automatically sort values as they are entered 

Barb Henderson
Подписаться 37 тыс.
Просмотров 35 тыс.
50% 1

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 59   
@BarbHendersonconsulting
@BarbHendersonconsulting 4 года назад
Thank you so much for watching my video. If you have any suggestions for future topics please leave them in the comments below.
@emilytran84
@emilytran84 8 месяцев назад
Thank you so much for your great video! Simple code but very helpful.
@BarbHendersonconsulting
@BarbHendersonconsulting 8 месяцев назад
Glad it was helpful!
@ericwilliamson6364
@ericwilliamson6364 3 года назад
This has solved and issues I have been working on for months! Youre the best! Thank You! I would love to explore more maybe around how you can automatically pull data from an online source? Keep up the good work!
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
Glad it helped!
@sudoalex
@sudoalex 4 года назад
I really appreciate your hard work and amazing guides they're very useful in fact you saved my life a lot of times. I would like you to make if possible a video about how to solve this issue I'm facing: 1. Have a sheet with a table column *A* , *B* , *C* . 2. In column *A* I have *Status* as header. I column *B* I have name as header. And finally in column *C* I have Phone number. 3. And now in column *D1* I have a drop-down list with all the months of the year 4. And now *here's the problem* I want to store every data input entered in each of those fields and then load each cell value according to the month selected. 5. Let's say I have A2 = Active, B2 = Mark, C2 = 12345678 and the selected month is January. And then I have A2 = Inactive, B2 = Markus, C2 = 123458 and the selected month is February I will try to share the worksheet so it's more clear
@KomdyIzHere
@KomdyIzHere 9 месяцев назад
Thanks it was very helpful but I have a small issue how can I add tow rows as header in formula?
@BarbHendersonconsulting
@BarbHendersonconsulting 9 месяцев назад
you could change this to b2 Range("B1:B" & lastrow).Sort key1:=Range("B1:B" & lastrow), _
@dustinworthy2750
@dustinworthy2750 Год назад
If you have values in rows, but need totals sorted this way, will the information in the row that is associated with that individual move as totals are sorted?
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
it will sort by the last information entered, you would have to increase the range of the sort
@linhnguyen1644
@linhnguyen1644 2 года назад
Hi, thank you for useful video. When I first copied your code, it worked immediately! But it was for a wrong column. After changing to the right column, it no longer works. I tried pasting your original code, but even the wrong column that changed at first did not even sort now. I tried reopening the file again, creating new sheet code but nothing work. Please help!
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
I would try shutting down your computer completely and trying it again.
@LushDiamondsfzco
@LushDiamondsfzco 11 месяцев назад
hi barb i need column B sorted means the valves parallel to column A To Z should be come along with it can you please help me out.
@BarbHendersonconsulting
@BarbHendersonconsulting 11 месяцев назад
you can expand your sort range Range("B1:B" & lastrow).Sort key1:=Range("A1:Z" & lastrow), _ order1:=xlAscending, Header:=xlNo but the last value entered in the value in "B"
@seascapes152
@seascapes152 Год назад
How do I make this work for all related columns a,c,d because they should all sort together together. How to simulataneously sort a,b,c,d?
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
It will only sort by one column
@findthetruth3021
@findthetruth3021 4 года назад
You are amazing and I love all of your videos, but there is something that I have searched all of the Google and RU-vid but didn't find it which is how to collect or filter only those cells that contains insert note or note. Please tell me how to do so. Many thanks.
@BarbHendersonconsulting
@BarbHendersonconsulting 4 года назад
If I understand you correctly, I have to videos on how to collect comments List all comments from sheet on separate sheet in Excel ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-3fRwsG7150g.html Change the Colour on Cells that have comments in Excel ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-zUwbu1Ztak0.html
@paharyyasser3149
@paharyyasser3149 11 месяцев назад
Thanks so much. Best. Now, I have a request. If I have to sort, let it be, few students with their marks for 5 subjects. I have a column of 5 students with their marks for 5 subjects. if I add another student with his marks, what do I do to obtain the change in alphabetic order (for students) with the change in their respective marks? Thanks.
@BarbHendersonconsulting
@BarbHendersonconsulting 11 месяцев назад
it is only sorting by one column and if you expand the range, it must be the last column entered
@ivqansana4013
@ivqansana4013 2 года назад
Amazing Work! Can you let know how to get your data automatically sorted by cell color in the case where cells are conditionally formatted by specific colors based on value entered? So, how to get the data sorted by cell color automatically with every new entry that changes cell color due to conditional formatting?
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
I have not tried that, it could be quite difficult
@ItsTyara
@ItsTyara Год назад
Hey Barb! Thank you for your extremely helpful video! I liked and subscribed! :) I have two quick and easy questions about custom sorting! 1.) I am sorting data by the terms "Expired, Pending, Grace, Current". - How do I modify your code to sort data by these terms instead of the numeric/alphabetic sorting? 2.) I am sorting data from A1 to E46 (an entire block of data). What do I modify your code to in order to sort this bigger range of data?
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
What you are asking for is a big project! I do not even know where I would start
@DDRamkissoon1
@DDRamkissoon1 Год назад
Hey Barb. Awesome code. What if you wanted to do with multiple columns & sort them Independently of each other. For example, I want to sort column "A" Ascending, then column "B" Ascending, column "C" Ascending, etc... all independent of each other. I've tried pasting the VBA multiple times with the appropriate ranges, but it's always giving me an error. Any Advice? Thank you in advance!
@DDRamkissoon1
@DDRamkissoon1 Год назад
I figured it out. Private Sub Worksheet_Change(ByVal Target As Range) Dim lastrow As Long lastrow = Cells(Rows.Count, 1).End(xlUp).Row If Not Intersect(Target, Range("A:A")) Is Nothing Then Range("A1:A" & lastrow).Sort key1:=Range("A1:A" & lastrow), order1:=xlAscending, Header:=xlYes End If lastrow = Cells(Rows.Count, 2).End(xlUp).Row If Not Intersect(Target, Range("B:B")) Is Nothing Then Range("B1:B" & lastrow).Sort key1:=Range("B1:B" & lastrow), order1:=xlAscending, Header:=xlYes End If End Sub
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
I do not think that you can do separate columns with this code
@chrissmink3662
@chrissmink3662 9 месяцев назад
Hi Barb. Do you know how to make this work on just a specific range of rows? E.g. L12:L55
@BarbHendersonconsulting
@BarbHendersonconsulting 9 месяцев назад
Range("L12:L55").Sort key1:=Range("L12:L55"), _ order1:=xlAscending, Header:=xlNo
@emilytran84
@emilytran84 8 месяцев назад
Hi, I have same concern and found this. If Not Intersect(Target, Range("L12:L55")) Is Nothing Then Range("L12:L" & lastrow).Sort key1:=Range("L12:L" & lastrow), _ order1:=xlAscending, Header:=xlYes
@LeiLim-k2z
@LeiLim-k2z Год назад
Hi, is this possible on a merge cells? Thank you!
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
I have never tried it on merged cells but I think you might have difficulty with that
@nikolatodorovic8962
@nikolatodorovic8962 3 года назад
Hello, very educative video. However i have a problem with this code. Its working when I enter the number, but when I put the formula, it doesn't sort ascending after calculation. Do you have any solution to my problem?
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
I do not think it is possible with formulas
@mohamedchakroun4973
@mohamedchakroun4973 4 года назад
Nice trick barb :-)
@makavellys
@makavellys Год назад
Doesn't work for me, added the code to the sheet after saving it and open again says - Invalid Outside Procedure.
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
I just tried it again. Make sure you save it as .xlsm it work perfect when I reopened the file
@amirrsssss
@amirrsssss 3 года назад
I use userform to insert the data to the last row. And i want to automatically sort it. I applied your codes in the wsheet but i need to click the data in the table first in order to sort. Is there any way for me to automatically sort the data without the needs to click the table? Thankyou for your code btw 🙏🏻
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
I do not think you can sort without clicking the table.
@jadenasora1514
@jadenasora1514 Год назад
how do you get to sort it with col 1?
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
Change "B" to "A" in the code
@babblespeech6251
@babblespeech6251 Год назад
Could you show us how to do this in google sheets?
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
sorry, Excel works with VBA and Google sheets works with Java Script, I do not code in Java script.
@cathlynesguerra7412
@cathlynesguerra7412 5 месяцев назад
Please can you type the formula hear😢🙏
@BarbHendersonconsulting
@BarbHendersonconsulting 5 месяцев назад
Private Sub Worksheet_Change(ByVal Target As Range) Dim lastrow As Long lastrow = Cells(Rows.Count, 2).End(xlUp).Row If Not Intersect(Target, Range("B:B")) Is Nothing Then Range("B1:B" & lastrow).Sort key1:=Range("B1:B" & lastrow), _ order1:=xlAscending, Header:=xlNo End If End Sub
@arpadcsorba2053
@arpadcsorba2053 3 года назад
Can you do a code that sorts by date (dd/mm/yy)
@BarbHendersonconsulting
@BarbHendersonconsulting 3 года назад
I do not no if that is possible. Even though Excel will allow you to display dates as dd/mm/yy, it processes them as mm/dd/yy
@embelkowitz
@embelkowitz 2 года назад
I know this is an old video, so hopefully you see this. Is there a way so that when the names are sorted any values to the rows next to them move with them. I'm making a sheet that organizes the game supply for my colleges board games. It will have columns that show the games name and information about it (min and max time, min and max players, type of game). Ex. If I insert a new game into the list and it moves from row z to b it cant contain the previous information for the game there. I will also have on filters, so club members can choose to view games certain types of games. Ex. shortest play time to longest. I'm hoping this makes sense
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
I am going to refer you to a really old video, the best way to do this is with the built in function ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-AsSyaWy7yiI.html
@ziaziaomar4924
@ziaziaomar4924 Месяц назад
Thank you
@BarbHendersonconsulting
@BarbHendersonconsulting Месяц назад
You're welcome
@renzsantillan5815
@renzsantillan5815 2 года назад
The code is not working, i dont know why
@BarbHendersonconsulting
@BarbHendersonconsulting 2 года назад
have you inserted the code on the worksheet rather than in a module?
@sudoalex
@sudoalex 4 года назад
Cool
@kamalmalek475
@kamalmalek475 4 года назад
Keep going your videos are much useful I follow your valuable information
@sathyabites5961
@sathyabites5961 Год назад
hi barb i need column B sorted means the valves parallel to column A should be come along with it can you please help me out.
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
Please note the values in the "C" column must be entered before the values in the "B" column Private Sub Worksheet_Change(ByVal Target As Range) Dim lastrow As Long lastrow = Cells(Rows.Count, 2).End(xlUp).Row If Not Intersect(Target, Range("B:B")) Is Nothing Then Range("B1:C" & lastrow).Sort key1:=Range("B1:B" & lastrow), _ order1:=xlAscending, Header:=xlNo End If End Sub
@erwinfscortez6013
@erwinfscortez6013 Год назад
Thank you. It really helps me.
@BarbHendersonconsulting
@BarbHendersonconsulting Год назад
Happy to help
Далее
Ozoda & Dilime - Lada
00:36
Просмотров 1,4 млн
Nice Algebra Math Simplification | Find the Value of X
7:01
The Home Server I've Been Wanting
18:14
Просмотров 18 тыс.
Excel VBA: How to Sort Data with VBA Macro
8:37
Просмотров 102 тыс.
Automatically move to specific cells on Excel sheet
2:11