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

1
How to Drag Formula Horizontally with Vertical Reference in Excel

Sometimes you might need to drag the formula horizontally with the vertical reference. In other words, you have to utilize the Fill Handle Tool for columns ...

0
How to Maintain Store Inventory in Excel (Step by Step Guide)

To check the performance of your business, you might have needed to maintain store inventory. It’s quite difficult to handle such a type of report manually. ...

1
[Fixed] Report Connections Slicer Not Showing All Pivot Tables

Pivot Table is one of the most powerful tools in Excel to present the summary of a larger dataset efficiently. Besides, a Slicer is an interactive tool for ...

1
How to Interpret Multiple Regression Results in Excel

Often you may execute Multiple Regression Analysis in Excel. But you may get troubled to understand the terms used in the regression analysis. In this article, ...

1
How to Share Excel File for Multiple Users

For working together in a team or organization, you might often need to share an Excel file. So that all of you can edit the workbook at the same time. In this ...

1
What to Do When Excel Is Not Responding? (11 Handy Tricks)

While working in Excel, you might get the message that Microsoft Excel is not responding. But why are you getting such a message and what will be the solution ...

1
[Fixed:] Unsaved Excel File Not in Recovery

Let’s assume a situation when you’re working in Excel and it is closed unexpectedly. Then, you obviously rely on the Document Recovery pane of Excel that ...

2
How to Forecast Revenue in Excel (6 Simple Methods)

Frequently, you might need to forecast the revenue of your company in the upcoming time. Luckily, Microsoft Excel provides some functions as well as features ...

1
Excel Pivot Table: Difference between Two Columns (3 Cases)

Certainly, Pivot Table is one of the powerful features in Excel analyzing the larger dataset efficiently. What if you need to find the difference between two ...

0
How to Create a Database with Form in Excel

In many cases, you might need to create a database in Excel. Luckily, Excel provides a data entry Form to accomplish such a task efficiently instead of doing ...

1
How to Convert Word Table to Excel Spreadsheet (6 Methods)

Frequently, you might need to convert the Word table to Excel for various purposes. In this article, I’ll show you 6 methods, which include tricks for a simple ...

1
How to Read CSV File in Excel (5 Quick Tricks)

While working in Excel, you may often need to deal with a CSV file. This might be opening a CSV file in Excel with keeping columns, converting a CSV file to an ...

0
Print to PDF and Email Using VBA in Excel (2 Useful Cases)

How would you feel if your Excel file is published in PDF format first and then goes to the Email inbox automatically using a single command? Sounds ...

0
How to Convert Notepad to Excel with Columns (5 Methods)

Sometimes your dataset might be stored in text (.txt) format in Notepad, a dedicated text editor application owned by Microsoft. However, Excel provides the ...

0
How to Make Subtotal and Grand Total in Excel (4 Methods)

Whenever you have a larger dataset and you want to compute subtotal for a specific field or some specific group and grand total covering the entire dataset. In ...

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