About author

Md Junaed-Ar-Rahman, a Biomedical Engineering graduate from Bangladesh University of Engineering and Technology, has contributed to the ExcelDemy project for one year. As a technical content developer, he has authored 15+ unique articles and actively addressed user problems. He participated in 2 specialized training programs on VBA and Chart & Dashboard design in Excel. His passion lies in solving problems uniquely and exploring new functions and formulas. Eager for future exploration, he aims to gain proficiency in applications beyond Excel.


Technical Content Developer at ExcelDemy in SOFTEKO.

Lives in

Dhaka, Bangladesh.


B.sc in Biomedical Engineering, Bangladesh University of Engineering and Technology


MATLAB, Solidworks, Microsoft Office, Microsoft Excel.


  • Technical Content Writing
  • Biomedical Engineer
    • Troubleshooting of medical device (ECG, Echo, USG)
    • Installation and dismantle of X-ray and CT Scan machines
    • Collaboration of users and service provider
  • Undergraduate Projects
    • Development of Cost-effective CPAP machine for New born babies
    • Developing setup for Heat Conductivity measurement of biological tissues

Latest Posts From Junaed-Ar-Rahman

How to Calculate Average in Excel (Ultimate Guide)

In this article, I will show you different ways of how to calculate average in Excel, especially using the AVERAGE function for certain numbers, rows/columns ...

Create Relationships in Excel (3 Effective Ways)

In Excel, we create relationships between tables that are logically related to each other. It helps us to avoid data redundancy as well as fetching data from ...

Secondary Axis in Excel (Add, Remove & Change)

In this article, you will learn how to add secondary axis in Excel chart using Recommended Charts option or using the Format Data Series feature. In addition ...

Formatting Chart in Excel (8 Suitable Ways)

Working with Excel charts is always fascinating. However, if you need formatting chart in Excel, you may get confused since there are a lot of formatting ...

How to Select Column in Excel (6 Easy Ways)

Here's an overview of how you can select a column by giving it a name. Read on to learn more. Download the Practice Workbook Select Column in ...

Alignment in Excel (Types, Change, Shortcut)

In this Excel tutorial, you will learn how to apply different types of alignment in Excel. We will use different techniques like using control text options and ...

Truck Operating Cost Calculator in Excel (Create with Easy Steps)

Calculating the operating cost for a truck is very important to get the actual data regarding the profit or loss in the transportation business. But ...

Excel VBA to Format Number with Leading Zero

Have you ever noticed that when you want to add a zero in front of any number, Excel automatically discards that? So, how can we add a zero in front of a ...

How to Loop Through Excel Files in Folder with VBA

Often we need to do the same type of work in different workbooks. It becomes very tiresome doing the same thing again and again. In this article, we will see ...

Excel VBA: Work with Variable in MsgBox

In this article, we will discuss how to work with the VBA MsgBox variable. We will explain the different types of variables available in VBA and use them in ...

Excel VBA Select Case Between Two Values (6 Examples)

In this article, we will discuss the use of Excel VBA Select Case to pick between two values. We will explain the syntax of the Select Case and use it for ...

Excel VBA Offset Column (5 Suitable Cases)

Often we need to move the active cell to the next cell without explicitly specifying its row and column coordinates. The Offset function provides a very ...

How to Make a Roster in Excel (with Detailed Steps)

Here's a roster template that we will be making throughout this article. You can follow along and make changes if you want a modified version, or simply ...

How to Create Clustered Scatter Plot in Excel (with Easy Steps)

A clustered scatter plot is a type of chart in Excel that displays data points as individual dots on a graph. Unlike a regular scatter plot where all data ...

How to Calculate Sales Conversion Rate Using Formula in Excel

In this article, we will demonstrate how to calculate the sales conversion rate formula in Excel. We may need to calculate various types of calculations for ...

Browsing All Comments By: Junaed-Ar-Rahman
  1. Thanks JASON for your comment.

    The issue you are encountering is the result of two potential situations. The first scenario is that you have implemented an additional conditional formatting within your data range. The second scenario is that you have not adjusted the formula to align with your data.
    However, you can modify the formula for conditional formatting and replace it with the following one.

    Remove all the conditional formatting except the dedicated one given in the method. Also, check whether there are any VBA codes running in your worksheet affecting the changes.

    Md Junaed Ar Rahman

  2. Thank you DENNIS for your comment.
    The code is automatic since whenever you run it, you don’t need to check which deadlines are 1 to 7 days away from the current date. Also, the code creates a draft automatically. However, if you want to automate the whole process, you will have to modify the code slightly and create a task scheduler. Copy the following code and paste it into the VBA module:

    Private Sub Workbook_Open()
        ' Call the SendReminderMailAutomatically subroutine when the workbook is opened
    End Sub
    Public Sub SendReminderMailAutomatically()
        Public Sub SendReminderMailAutomatically()
        ' Declare the variables
        Dim ws As Worksheet
        Dim XDueDate As Range
        Dim XRcptsEmail As Range
        Dim xMailContent As Range
        Dim xCrtOut As Object
        Dim k As Long
        Dim xMailSections As Object
        Dim xFinalRw As Long
        Dim CrVbLf As String
        Dim xMsg As String
        Dim xSubEmail As String
        On Error Resume Next
        ' Set the worksheet
        Set ws = ThisWorkbook.Sheets("YourSheetName") ' Replace "YourSheetName" with the actual sheet name
        ' Define the ranges from the worksheet
        Set XDueDate = ws.Range("A2:A" & ws.Cells(ws.Rows.Count, "A").End(xlUp).Row) ' Assuming due dates are in column A starting from row 2
        Set XRcptsEmail = ws.Range("B2:B" & ws.Cells(ws.Rows.Count, "B").End(xlUp).Row) ' Assuming email addresses are in column B starting from row 2
        Set xMailContent = ws.Range("C2:C" & ws.Cells(ws.Rows.Count, "C").End(xlUp).Row) ' Assuming email content is in column C starting from row 2
        ' Count rows for the due dates
        xFinalRw = XDueDate.Rows.Count
        ' Set command to open MS Outlook Application
        Set xCrtOut = CreateObject("Outlook.Application")
        ' Apply For loop to conduct the operation in each row one by one
        For k = 1 To xFinalRw
            ' Apply If condition for the Due Date values
            If XDueDate.Cells(k).Value  "" Then
                ' Condition set to send mail if the difference between due dates and current date is greater than 1 and less than 7 days
                ' Means 1 < X < 7, X = Due Date - Current Date
                If CDate(XDueDate.Cells(k).Value) - Date  0 Then
                    ' Create the subject, body, and text contents with the required variables
                    xValSendRng = XRcptsEmail.Cells(k).Value
                    xSubEmail = xMailContent.Cells(k).Value & " on " & XDueDate.Cells(k).Value
                    CrVbLf = vbCrLf
                    xMsg = "Dear " & xValSendRng & CrVbLf
                    xMsg = xMsg & "Text : " & xMailContent.Cells(k).Value & CrVbLf
                    ' Create the email
                    Set xMailSections = xCrtOut.CreateItem(0)
                    ' Define the position to place the Subject, Body, and Recipients Address
                    With xMailSections
                        .Subject = xSubEmail
                        .To = xValSendRng
                        .Body = xMsg
                    End With
                    Set xMailSections = Nothing
                End If
            End If
        Set xCrtOut = Nothing
    End Sub
        MsgBox "Reminder emails have been sent.", vbInformation
    End Sub

    Create a task-scheduler:
    Now, follow the steps below to create a task scheduler:
    1. Type “Task Scheduler” in the Windows search bar and press “Enter”.
    2. In the right-hand Actions pane, click on “Create Basic Task”. Set a name and description for your task.
    3. Choose Daily in the “Trigger” option and Start a Program in the “Action” part.
    4. In the Program/Script box, give the directory of “excel.exe” file.
    5. In the “Add arguments” field, specify the full path to your Excel file.
    6. Click “Finish.”

    Hopefully, following the steps above, you will be able to perform your desired task.

    Md Junaed Ar Rahman

  3. Hello Michiel,

    Thanks for your question. If you want to add new products to the dataset and include them in your calculation, you will have to convert the range into a table. Then you will be able to add as many new products as you required by inserting new rows in the dataset.

    On the other hand, if the products in the dataset are discontinued, you don’t need to modify any cells that contain the “Quantity” or “Revenue” values since we are not doing any arithmetic operation on them. For safety reasons, you can apply the IFERROR()function in all the cells where you are applying formula. For example, you would change the formula in Column G into IFERROR(E5/C5). The exception is the cells where we will calculate the sum of different values. For those cells, we will modify the formula of M11 into SUM(IF(ISNUMBER(M5:M10), M5:M10)).

    Hopefully, you have got the desired answer.

  4. Hello Terry Smith,

    Thanks for your question. Most probably you are using a function like TODAY() function to find the first date in our worksheet. Then you have applied the Fill Handle feature. That’s why, the days are updating every day. The solution to this problem is to manually input the first date and then apply the Fill Handle feature.

    Also, if your problem is different from the problem that I have assumed, then give us the Excel files. It will be convenient for us to solve the issue.

    Junaed-Ar-Rahman Mar 9, 2023 at 1:00 PM

    Dear HARIRI,

    When you use the following command in your code, the prompt will not appear.
    Application.DisplayAlerts = False
    However, if you want to open a new file in the same name in the same folder, there may be two scenarios. You might be able to do that without any obstacles because you have a file with .xlsm extension only with that name and no .xlsx file with that name. But if you have two files with same name in same folder, one with .xlsm extension and another with .xlsx extension, then you cannot open a new Excel file in that folder. Prompt will appear to warn you that there is a folder with the same name and you will have to discard that action or have to modify the file name.

Advanced Excel Exercises with Solutions PDF