MD. ABDUL KADER is an engineer with a talent for Excel and a passion for VBA programming. To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SWM, GIS, RS, and SPSS. He holds a B.Sc in Urban & Regional Planning from Chittagong University of Engineering and Technology and has shifted to become a content developer. In this role, he crafts technical content centred around Excel and VBA. Outside the professional realm, catch him immersed in books, exploring new places during travels, and watching movies.
While creating or modifying a UserForm, you may need to add or create images from the worksheet. In this instructive session, I’ll demonstrate 3 methods to add ...
Frequently, you may need to find a particular data, formatting, or even cell references and then replace it with something new. Find and Replace is one of the ...
The VBA Dynamic Range provides you the opportunity to use the same code for newly added or removed data while working with a larger dataset. However, it will ...
Let’s introduce today’s dataset where the name of the Items is provided along with Order Dates, Unit Price, Quantity and Sales. Method 1 - VLOOKUP a ...
Pivot Table, one of the powerful features in Excel, analyzes the larger dataset efficiently. But probably you have faced the problem of date formatting in the ...
If you have a larger dataset and you need to apply filters in columns. More importantly, you might require to count only unique values except for the duplicate ...
Once you input any data for example a number, it will be stored typically as a number. More importantly, if the number of digits is greater than 15, your input ...
Sometimes we need to combine multiple cells into one keeping with the line break. Undoubtedly, Excel provides some quickest features to do that. In this ...
Basically, you may need to lock multiple cells for two reasons. One is to lock cells for protecting them from further edits or changes whereas the other reason ...
Perhaps you may have a larger dataset with numerous blank cells. Using a popular highlighting tool i.e. Conditional Formatting, you are easily able to ...
Sometimes you may get troubled while printing any large Excel datasets or charts. But you can fix this issue using some handy methods. Prior to fixing this ...
Frequently you may need to omit unnecessary cells containing specific cell values that are no longer useful for you. For example, you might delete those rows ...
Probably you have a larger dataset with duplicates and non-duplicates values and you need to count the number of duplicates. If you’re looking for such types ...
Often you may need to copy filtered rows in Excel. And this task can be accomplished using Excel as well as the VBA code. In this article, I’ll show you 5 ...
You can easily apply the auto filter in Excel except using VBA code. But copying the filtered visible rows in the existing or a new working sheet is a tiresome ...
ExcelDemy is a place where you can learn Excel, and get solutions to your Excel & Excel VBA-related problems, Data Analysis with Excel, etc. We provide tips, how to guide, provide online training, and also provide Excel solutions to your business problems.
Contact | Privacy Policy | TOS
Hello EAC,
Thanks for your question. Most likely, you need to put a not equal sign (<>) inside the If…Then statement of your second code. So, the corrected second code will be as follows-
However, your used three codes are quite messy. I would like to suggest that you can use the following code to lock a specific cell range in all worksheets of your Excel file.
Again, try this code to unlock the specific cell range in all worksheets.
I hope these will work! Moreover, you can follow lock and unlock cells using VBA to explore more efficient methods.
Hello Michael,
Please specify your problem in detail or send the excel file via [email protected] email address.
Dear Deka,
It’s nice to hear from you with such wonderful appreciation. I myself always try to represent Excel applications in a more user-friendly way. And we, the ExcelDemy team, are working as a one-stop Excel solution provider.
Thanks, and take care of yourself. Goodbye!
Md. Abdul Kader
Editor, ExcelDemy.