How to sort table with VBA?

Osamu9Dazai

New Member
Joined
Dec 20, 2024
Messages
2
Office Version
  1. 2024
  2. 2021
Platform
  1. Windows
Hello, just very interested how to do it , tried everything i knew. Got the next lesson:
Set the name of cell B15 to 'criterion1' and the name of cell B18 to 'new'.
Assign a validation (input check) to the cell named 'criterion1', which allows you to select one birth month from the list.
Write a VBA program that writes from a large table of people (around cell 'tab_alg') to another region (starting at cell 'new')
data of those persons whose birth month and city are specified in the 'criterion1' cell in bold.
The result must have columns: first name, last name, city, month of birth and salary (be sure to in this order).
The program must also output (MsgBox) the number of records (rows) in the resulting result and the arithmetic mean of the salaries of those people.
First, the old results must be deleted (the titles remain).
Also consider the possibility that no records meet the conditions.
The procedure must start when clicking on a graphic object placed on a worksheet and activating this worksheet.
NB! Advanced Filter is NOT used in the VBA program of this application
image (5).png
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: How to sort table with VBA?
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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