Joyanta Mitra

About author

Joyanta Mitra, a BSc graduate in Electrical and Electronic Engineering from Bangladesh University of Engineering and Technology, has dedicated over a year to the ExcelDemy project. Specializing in programming, he has authored and modified 60 articles, predominantly focusing on Power Query and VBA (Visual Basic for Applications). His expertise in VBA programming is evident through the substantial body of work he has contributed, showcasing a deep understanding of Excel automation, and enhancing the ExcelDemy project's resources with valuable programming insights.

Designation

Excel and VBA Content Developer at ExcelDemy, SOFTEKO.

Lives in

Dhaka, Bangladesh.

Education

B.sc in Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology.

Expertise

Verilog, Micropython, Mikroe C, Java(Core+TCP/IP), Digital design, Matlab, Assembly Programming.

Project

  • Java games: Snake, Sudoku, Reinforcement Learning using Gym and Anaconda.

Research

  • Ion Energy Distribution in Plasma, Prediction of Uniform Energy Electron Location.

Latest Posts From Joyanta Mitra

0
IF with ISERROR Function in Excel: 4 Practical Examples

In this article, we are going to explore the combination of IF with the ISERROR function in Excel in different circumstances, such as finding unit prices, ...

0
How to Create Files From Excel List

Want to create files from an Excel list without having to spend hours doing it by hand? Excel's VBA (Visual Basic for Applications) allows you to automate this ...

0
How to Rank in Excel Highest to Lowest (13 Handy Examples)

Ranking data in Excel is incredibly helpful in identifying the top or bottom performers in a dataset. By ranking data from highest to lowest, you can quickly ...

0
How to Create Drop Down List from Another Workbook in Excel

Drop-down lists in Excel are a great way to make data entry more efficient and accurate. By using a drop-down list, users can select predefined options instead ...

0
How to Use Target Address in Excel VBA (3 Examples)

Excel VBA Target Address refers to the location of a cell or range that caused a specific event to occur in an Excel worksheet. In this article, we automated ...

0
Reasons And Solutions for Excel Object Required Error in VBA

The object required error in VBA occurs when you attempt to perform an operation on a variable or object that is not set or initialized. This error can be ...

0
How to Use Excel Color Scale Based on Text (2 Suitable Examples)

You can apply color scales based on values. This is helpful if you want to rapidly recognize particular values depending on their color. Use color scales, for ...

0
Excel VBA to Find Matching Value in Column (8 Examples)

This article will show you how to use Excel VBA to Find Matching Values in Columns. With VBA, you can automate the process of searching for specific values or ...

0
Pop Up Excel VBA MsgBox When Cell Meets Criteria

Looking for ways to pop up Excel VBA MsgBox when a cell meets the criteria? Then, this is the right place for you. In Microsoft Excel, VBA (Visual Basic for ...

0
How to Use Excel VBA MsgBox Title (5 Examples)

VBA is a programming language used to automate tasks in Excel. When creating VBA programs, it's important to display messages to the user, and giving these ...

0
How to Create Fuel Cost Calculator Using Excel Formula

In this article, we are going to create a Fuel Cost Calculator using Excel formula. Here, we are going to give you a very easy way to find out the cost of your ...

0
How to Limit Decimal Places in Excel (5 Easy Ways)

It is very necessary to limit decimal places in Excel to progress with further calculations. Sometimes it is irritating to have so many digits after the ...

0
How to Use Excel LARGE Function with Duplicates in Excel

The LARGE function cannot identify the unique nth largest value if duplicates are available in an array. In this article, you will find the nth largest value ...

0
How to Perform Bilinear Interpolation in Excel (with Easy Steps)

Bilinear interpolation is a mathematical process to estimate the function value of two variables when you do not know the function values of the input ...

Browsing All Comments By: Joyanta Mitra
  1. Dear April
    Thanks for your concern. There were some minor formatting issues with the VBA codes. Sorry for the inconvenience. We have updated our article. If you follow now, you will get the perfect calculator.
    Thanks for your help
    Regards,
    Joyanta Mitra
    ExcelDemy

  2. Dear Adam,
    Thank you for your concern. You can not change the color of Excel button but you can use Command Button to change the button color.
    You can follow the steps below to color your command button:
    1. use Developer tab > Insert > ActiveX Controls > Command Button.
    Adding Command button
    2. A command will appear and right click on it.
    3. Choose CommandButton Object > Edit.
    right click on the command button
    Name the button as Start.
    4. Now right click on the command button and choose View Code.
    view code
    5. Then write code below for starting.

    
    Private Sub CommandButton2_Click()
    countDown = Now + TimeValue("00:00:01")
    Range("B4") = Range("B4") + TimeValue("00:00:01")
    Application.OnTime countDown, "StartTimer"
    CommandButton2.BackColor = 13959039
    End Sub
    

    Finally the button color has been added.
    start button colored
    6. Now create a stop buttom and use the code below:

    
    Private Sub CommandButton1_Click()
    Application.OnTime EarliestTime:=countDown, Procedure:="StartTimer", Schedule:=False
    CommandButton1.BackColor = 13959039
    End Sub
    

    7. Write down the code for reset button:

    
    Private Sub CommandButton3_Click()
    Range("B4") = TimeValue("00:00:0")
    CommandButton3.BackColor = 13959039
    End Sub
    

    Finally, you will have colored command button. You can change the color by changing color code 13959039.
    Final result

  3. Dear Kelley Sauer,
    Please use this formula below to count sales having date.
    =COUNTIF(E5:E14, "<>")
    Count cells when date is used
    It will count all sales with date. Using this formula, you will not get zero anymore. Moreover I have also used Ctrl+: to insert date.
    With Regards,
    Joyanta Mitra

  4. Dear Anas,
    You have to write the following code to get data validation for duplicate values, you have write the code below.

    
    Sub CreateUniqueDropDownListInC12()
        Dim ws As Worksheet
        Dim cell As Range
        Dim dict As Object
        Dim dataValidation As Validation
        Dim dvList As String
        
        ' Define the worksheet where you want to apply the data validation
        Set ws = ActiveSheet
        
        ' Create a dictionary object to store unique values
        Set dict = CreateObject("Scripting.Dictionary")
        
        Application.ScreenUpdating = False
        
        ' Loop through the specified range (C5 to C11)
        For Each cell In ws.Range("C5:C11")
            If cell.Value <> "" Then ' Check for non-empty cells
                If Not dict.Exists(cell.Value) Then
                    dict(cell.Value) = 1 ' Add the value to the dictionary
                End If
            End If
        Next cell
        
        ' Convert the unique values to a comma-separated string for data validation
        dvList = Join(dict.Keys, ",")
        
        ' Apply data validation with a dropdown list to cell C12
        Set dataValidation = ws.Range("C12").Validation
        With dataValidation
            .Delete
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=dvList
            .IgnoreBlank = True
            .InCellDropdown = True
            .ShowInput = True
            .ShowError = True
        End With
        
        Application.ScreenUpdating = True
    End Sub
    

    Then we get the data values of unique departments Marketing and Sales.
    datavalidation with duplicates
    With regards,
    Joyanta Mitra

  5. Dear Santosh Kumar,
    Please clarify the question. How can a person do more than 24 hours in 24 hours?
    With Regards.
    Joyanta Mitra

  6. Dear FRANCESCA BATHE,
    End Position is given according to column To. Where there is RENT in To column, the number starts 1,2,3,4 and ends with SPACE1 numbered 5. Then next is Food starting 6,7,8, 9 and ends with SPACE2 numbered 10. Likewise, numbering is done for every cell data in End Position.
    Numbering End position
    Regards,
    Joyanta Mitra

  7. Code is alright. Please inform your particular problem.

  8. Dear Prince,
    Thank you very much for reading our article.
    According to your query, 1st you wanted to know about a formula to create a drop-down list that will be used to select different types of leaves. You will get that in Step 3 of this article. In our Excel file, we selected leave using the drop-down list in Record sheet. Also when you move to any month leave information will be based on the Record sheet. So, information will not move from one month to another. Try this and hope you will get the solution.
    Otherwise, send your Excel file with what you want to get and we will try to provide a solution. You can mail us at [email protected].
    Thanks
    Joyanta Mitra
    ExcelDemy

  9. Dear Karlyn Martinez,
    For your convenience, I have showed the task with following steps.
    Steps:
    ● First, you have to recognize the pattern in the formula
    Showing pattern
    ● You can use Format Painter or drag the row to add a new row or rows for editing new data.

    Modifying data
    ● Now add new data.

    Adding new data
    ● Inset new rows in the Summary sheet.
    Inserting new rows in Summary sheet
    ● Insert the Entire row.
    Inserting new row
    ● Edit the code according to the main dataset. As now in Jan worksheet, new data is added, and so the range will be changed to AH$15 and $B$15.
    Showing the formula change

    Hope, this will be helpful for you.

    Regards,
    Joyanta Mitra
    Excel & VBA Content Developer

  10. This code will solve your problem. The code has a condition checking values blank or not.

    Sub Duplicates_Dif_Colors()
    Dim RG As Range
    Dim TT As String
    Dim CL As Range
    Dim CR As String
    Dim CP As Range
    Dim CD As Long
    Dim Cltn As Collection
    Dim J As Long
    
    On Error Resume Next
    
    If ActiveWindow.RangeSelection.Count > 1 Then
    TT = ActiveWindow.RangeSelection.AddressLocal
    Else
    TT = ActiveSheet.UsedRange.AddressLocal
    End If
    
    Set RG = Application.InputBox("Select range of data with duplicates:", "Duplicate values with Colors", TT, , , , , 8)
    If RG Is Nothing Then Exit Sub
    
    CD = 2
    Set Cltn = New Collection
    
    For Each CL In RG
    If CL.Value <> "" Then ' check if cell is not blank
    On Error Resume Next
    Cltn.Add CL, CL.Text
    If Err.Number = 457 Then
    CD = CD + 1
    Set CP = Cltn(CL.Text)
    If CP.Interior.ColorIndex = xlNone Then CP.Interior.ColorIndex = CD
    CL.Interior.ColorIndex = CP.Interior.ColorIndex
    ElseIf Err.Number = 9 Then
    MsgBox "Found excessive duplicates", vbCritical, "Duplicates with Colors"
    Exit Sub
    End If
    On Error GoTo 0
    End If
    Next
    End Sub
    

    Output:

    Blank cells not colored

  11. Please write Ticker correctly both in your xlsx file and the code. Do not try to give invalid ticker or outdated ticker. Provide problems in detail for better service please.

  12. First, you have to create different power queries for each worksheet for other tickers and copy the same code. Otherwise, it triggers the first. Then for 10 different tickers,the code is

    
    let
        TickerList = {"AAPL", "GOOG", "MSFT", "AMZN", "FB", "TSLA", "NVDA", "JPM", "BAC", "V"},
        StartDate = Excel.CurrentWorkbook(){[Name="StartDate"]}[Content]{0}[Column1],
        EndDate = Excel.CurrentWorkbook(){[Name="EndDate"]}[Content]{0}[Column1],
        #"Loop Through Tickers" = List.Transform(TickerList, each
            let
                Ticker = _,
                Source = Csv.Document(Web.Contents("https://query1.finance.yahoo.com/v7/finance/download/"&Ticker&"?period1"&StartDate&"&period2"&EndDate),[Delimiter=",", Columns=7, Encoding=1252, QuoteStyle=QuoteStyle.None]),
                #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
                #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Date", type date}, {"Open", type number}, {"High", type number}, {"Low", type number}, {"Close", type number}, {"Adj Close", type number}, {"Volume", Int64.Type}})
            in
                #"Changed Type"
        ),
        #"Loop Through Tickers1" = #"Loop Through Tickers"{8}
    in
        #"Loop Through Tickers1"

    this code creates 10 tables for 10 different tickers. You have to select one table according to Ticker and hover over the query in Workbook Query Section and press View in Worksheet. You will get the table have to create 10 sheets separately.

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo