VBA codes

moha98

New Member
Joined
Jul 2, 2024
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
I'm new to the VBA tool Please can you help me,
1-I need some cod to sort data in a range by the first column in ascending order.
2- I need a VBA script to filter data in a range to show only rows where the value in column A is greater than 350
3-How to fill any cell with the value of 500 with the red color using VBA script
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Welcome to the Board!

You should be able to get the first two things by using the Macro Recorder and record yourself performing those steps manually. That will give you the VBA code that you need (though you can usually clean it up a little after the fact to make it run a little smoother).

For the last item, there is no need for VBA code, as you can just use Conditional Formatting for that, which works automatically. If you really want VBA code for it, I would recommend doing the same thing as the first two items, and turn your Macro Recorder on and record yourself applying the Conditional Formatting. Then you will have VBA code that sets up the Conditional Formatting that does what you want.
 
Upvote 0
Welcome to the Board!

You should be able to get the first two things by using the Macro Recorder and record yourself performing those steps manually. That will give you the VBA code that you need (though you can usually clean it up a little after the fact to make it run a little smoother).

For the last item, there is no need for VBA code, as you can just use Conditional Formatting for that, which works automatically. If you really want VBA code for it, I would recommend doing the same thing as the first two items, and turn your Macro Recorder on and record yourself applying the Conditional Formatting. Then you will have VBA code that sets up the Conditional Formatting that does what you want.
Thank you
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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