Md. Abdul Kader

About author

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.

Designation

Team Leader at ExcelDemy in SOFTEKO.

Lives in

Dhaka, Bangladesh.

Education

B.Sc in Urban & Regional Planning, Chittagong University of Engineering and Technology

Expertise

SWM, GIS, RS, SPSS, MS Excel, PowerQuery, PowerPivot & VBA

Experience

  • Technical Content Writing
  • Team Management

Summary

  • Currently working as Team Leader of ExcelDemy.
  • He started writing technical content for Excel & VBA for ExcelDemy in 2021.

Latest Posts From Md. Abdul Kader

0
Pivot Table Not Refreshing (5 Issues & Solutions)

Undoubtedly, the Pivot Table is an essential tool in Excel to summarize a larger dataset effectively. However, users may get troubled as the Pivot Table is not ...

0
How to Update Pivot Table Range (5 Suitable Methods)

There’s no denying that the Pivot Table is one of the most powerful tools in Excel to analyze a larger dataset quickly and extract necessary data efficiently. ...

0
How to List Sheet Name in Excel (5 Methods + VBA)

In some cases, you may have dozens of sheets in your workbook. However, if you need the list of sheet names, you can use Excel formulas. In this article, I’ll ...

0
How to Lookup Text in Excel (7 Suitable Methods)

Useful and faster methods for looking up text values in Excel are necessary especially when you have a larger dataset. In this article, I’ll discuss lookup ...

0
Excel Drop Down List Not Working (8 Issues and Solutions)

We'll provide you with 8 solutions in case your drop down list function is not working. Let’s consider the following dataset where some items are given with ...

0
Absolute Cell Reference Shortcut in Excel (4 Useful Examples)

Absolute cell reference is necessary when we want to lock the position of a certain cell in order to copy the cell for further use. In a previous article, how ...

0
How to Use Excel Cell Format Formula (4 Effective Methods)

In some cases, we need to convert or adjust or transform the data cell in a specific format without changing the originality. In this article, I’ll discuss 4 ...

0
How to Find Duplicates in Excel Workbook (5 Methods)

Finding duplicates in an Excel workbook is essential for maintaining data accuracy. Identifying duplicate values ensures that the information within the ...

0
Data Table Not Working in Excel (7 Issues & Solutions)

Undoubtedly, a data table is a useful tool for updating, sharing, and analyzing data effectively. But sometimes we face issues that hamper working with the ...

0
How to Use DCOUNTA Function in Excel (5 Examples)

When you need to count the number of non-empty cells in a given database, you may utilize the Excel DCOUNTA function. In this article, I’ll exhibit the basics ...

0
How to Generate Moving Average in Excel Chart (4 Methods)

Moving average is a common term in time-series analysis to review previous data and predict the future. In this article, I’ll show the fundamental concept of ...

0
How to Use SHEETS Function in Excel (5 Useful Examples)

How would you feel if you have numerous worksheets in your Excel workbook? In such a situation, Excel provides a useful function to know the number of working ...

0
How to Use Excel RANK Function (6 Ideal Examples)

The simplest technique to establish a number’s relative position in a list of numbers is to sort the list in descending (from largest to smallest) or ascending ...

0
How to Use ROUND Function in Excel (9 Examples)

In certain circumstances, we prefer the rounded or approximate number rather than the exact number for making communication easier. The ROUND function returns ...

0
How to Use INT Function in Excel (8 Suitable Examples)

When you have a decimal number in your dataset, you can use the INT function in Excel to get the nearest integer. Basically, we will discuss in this article ...

Browsing All Comments By: Md. Abdul Kader
  1. 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-

    Sub block()
    Dim hz As String
    Dim hz1 As String
    
    hz = InputBox("enter your password")
    hz1 = InputBox("repeat password")
    
    If hz <> hz1 Then
    MsgBox "The repeated password is not identical!", vbExclamation
    hz = ""
    hz1 = ""
    Else
    Columns("D:F").Select
    Selection.Locked = False
    Range("D8:F12").Select
    Selection.Locked = True
    Range("a1").Select
    ActiveSheet.Protect hz
    End If
    End Sub

    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.

    Sub Lock_CellRange_AllSheets()
        Dim ws As Worksheet
        For Each ws In ActiveWorkbook.Worksheets
            ws.Unprotect Password:="1234" 'Replace the password if you want
            ws.Range("D8:F12").Locked = True 'Replace the cell range
            ws.Protect Password:="1234", UserInterfaceOnly:=True 'Replace the password with the actual password for the workbook if it is protected
        Next ws
    End Sub

    Again, try this code to unlock the specific cell range in all worksheets.

    Sub Unlock_CellRange_AllSheets()
        Dim ws As Worksheet
        For Each ws In ActiveWorkbook.Worksheets
            ws.Unprotect Password:="1234" 'Replace the password if you want
            ws.Range("D8:F12").Locked = False 'Replace the cell range
            ws.Protect Password:="1234", UserInterfaceOnly:=True 'Replace the password with the actual password for the workbook if it is protected
        Next ws
    End Sub

    I hope these will work! Moreover, you can follow lock and unlock cells using VBA to explore more efficient methods.

  2. Hello Michael,
    Please specify your problem in detail or send the excel file via [email protected] email address.

  3. 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.

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo