Mehedi Hasan Shimul

About author

Md. Mehedi Hasan, with a BSc in Electrical & Electronic Engineering from Bangladesh University of Engineering and Technology, holds a crucial position as an Excel & VBA Content Developer at ExcelDemy. Driven by a deep passion for research and innovation, he actively immerses himself in Excel. In his role, Mehedi not only skillfully addresses complex challenges but also exhibits enthusiasm and expertise in gracefully navigating tough situations, emphasizing his steadfast commitment to consistently deliver exceptional and quality content. Apart from creating Excel tutorials, he is interested in Data Analysis with MS Excel, Verilog, Assembly, Arduino, MATLAB, Pspice, and HFSS.

Designation

Excel & VBA Content Developer at ExcelDemy in SOFTEKO.

Lives in

Dhaka, Bangladesh.

Education

B.Sc. in Electrical & Electronic Engineering, BUET.

Expertise

Microsoft Office, C, C++, Verilog, Assembly, Arduino, MATLAB, Pspice, HFSS.

Experience

  • Technical Content Writing
  • Undergraduate Projects
    • Designing of a prototype of power factor improvement plant using zero cross technology in Arduino.
    • Automatic water level indicator and motor regulator using Arduino.
    • Mobile signal detector and buzzer.
    • Design of a 8-bit processor using Verilog.
    • Designing a stacked patch antenna implantable in brain tissue using HFSS Software.

Latest Posts From Mehedi Hasan Shimul

0
How to Add Text Box in Excel Graph (2 Simple Ways)

Creating graphs from data in Excel helps a lot with data analysis. Sometimes we want to add a text box to the graph which makes the graph and its element more ...

0
How to Make a Daily Checklist in Excel (2 Simple Methods)

A checklist displays some items, tasks, etc. and beside them, attached boxes where we can put a mark for denoting whether the task is complete or not. Making a ...

1
Using Excel VBA to Scrape a Table from a Website – 4 Steps

This is a real-time data table from the investing.com website. STEP 1 - Open the Visual Basic Editor Go to the Developer tab and select Visual ...

0
How to Add Prefix Without Formula in Excel (2 Easy Ways)

Sometimes, we have a dataset in Excel and we may want to add a common prefix to all the data. We can do that quite simply in Excel without even using a ...

0
How to Remove Rows Containing Identical Transactions in Excel?

In many cases, we record transactions in Excel. And in various ways, we may include the same data in multiple rows which causes problems when we work with the ...

0
How to Add 3 Years to a Date in Excel (3 Effective Ways)

When we work with dates in Excel, sometimes we may want to add specific years to a date. It’s quite easy to do in Excel. At the same time, Excel offers several ...

0
How to Filter Cells with Comments in Excel (With Easy Steps)

Sometimes adding a comment to a cell in Excel helps a lot in understanding the dataset. We may wish to filter the cells with comments attached to them, this ...

0
[Fixed!] Excel Chart Data Labels Overlap (3 Possible Solutions)

When we work in Excel, sometimes we create Charts that can have data labels. If the size of the data is large then there’s a chance that the data labels will ...

0
How to Convert USD to CAD in Excel (4 Quick Tricks)

In this article, we will present 4 quick tricks to convert USD to CAD in Excel (and how to convert CAD to USD). We'll use the following dataset to demonstrate ...

0
How to Display Document Properties in Excel (3 Simple Methods)

When an Excel worksheet is created, the document automatically includes a number of properties. In this article, we will demonstrate 3 simple methods to ...

0
[Fixed!] Excel Ruler Not Showing (With Easy Solution)

While working in Excel, we may want the Ruler to show up on the top and left side of the worksheet. It helps to resize the Row Height or Column Width precisely ...

0
How to Create a Lookup Table in Excel (5 Easy Ways)

  Suppose we have a dataset containing some Product ID, Delivery Status and Price of those products. We will show the way to find specific data from ...

0
How to Use the COUNTIF Function to Calculate Percentages in Excel – 2 Examples

The COUNTIF Function The COUNTIF function counts the number of data that matches a criterion. You can calculate both text values and numeric values. ...

0
How to Copy Excel Sheet into Word (4 Simple Methods)

For various purposes, we can copy an Excel sheet into MS Word. For example, copying Excel sheets into MS Word helps to make reports in MS Word with data tables ...

0
How to Import Data from Google Sheets to Excel (3 Easy Ways)

The sample dataset contains information on Product, Size, and Price. Method 1 - Download Google Sheets as Excel File   Open the Google sheet to be ...

Browsing All Comments By: Mehedi Hasan Shimul
  1. Reply cropped Mehedi Hasan Shimul
    Mehedi Hasan Shimul Jun 4, 2023 at 4:01 PM
    • Hi NARASIMHAN!

    Thank you for your queries. Let’s change the code a bit. Use the following code to copy the data and paste it as values.

    Sub CopyWorksheetsToNewWorkbook()
        Dim srcWorkbook As Workbook
        Dim newWorkbook As Workbook
        Dim srcWorksheet As Worksheet
        Dim newWorksheet As Worksheet
        ' Set the source workbook
        Set srcWorkbook = ThisWorkbook
        ' Create a new workbook
        Set newWorkbook = Workbooks.Add
        ' Loop through each worksheet in the source workbook
        For Each srcWorksheet In srcWorkbook.Worksheets
            ' Copy only values to the new workbook
            srcWorksheet.UsedRange.Value = srcWorksheet.UsedRange.Value
            ' Copy the data to the new workbook
            srcWorksheet.Copy After:=newWorkbook.Sheets(newWorkbook.Sheets.Count)
            Set newWorksheet = newWorkbook.Sheets(newWorkbook.Sheets.Count)
            newWorksheet.Name = srcWorksheet.Name
            newWorksheet.Cells.Copy
            newWorksheet.Cells.PasteSpecial xlPasteValues
            Application.CutCopyMode = False
        Next srcWorksheet
        ' Save and close the new workbook
        ' Replace "C:\Path\To\Save\NewWorkbook.xlsx" with your desired file path and name
        newWorkbook.SaveAs "C:\ExcelDemy\NewWorkbook.xlsx"
        newWorkbook.Close
        ' Clean up
        Set newWorksheet = Nothing
        Set newWorkbook = Nothing
        Set srcWorksheet = Nothing
        Set srcWorkbook = Nothing
    End Sub
    

    Afterward, you will see result like this.

    Copy Multiple Sheets to New Workbook as values with VBA - Excel

  2. Reply cropped Mehedi Hasan Shimul
    Mehedi Hasan Shimul Jun 4, 2023 at 3:36 PM
    • Hi PRANEETH!

    Thank you so much for your observation. We will rectify and update this error soon. Thanks again for your concern.

  3. Reply cropped Mehedi Hasan Shimul
    Mehedi Hasan Shimul Jun 4, 2023 at 3:24 PM

    Hi MIGUEL,

    We are glad, you asked the questions. It’s quite easy to import data from separate sheets and save it as separate documents. Simply, use the following code in a new module of VBA. Only, you have to change the file directory to save the doc file.

    Sub ExportWorksheetsToWord()
    Dim objWord As Object
    Dim objDoc As Object
    Dim objRange As Object
    Dim ws As Worksheet
    ' Create a new instance of Microsoft Word
    Set objWord = CreateObject("Word.Application")
    ' Make Word visible (optional)
    objWord.Visible = True
    ' Loop through each worksheet in the workbook
    For Each ws In ThisWorkbook.Worksheets
    ' Create a new Word document for each worksheet
    Set objDoc = objWord.Documents.Add
    ' Reference the range of the current worksheet
    Set objRange = ws.UsedRange
    ' Copy the range to the Clipboard
    objRange.Copy
    ' Paste the range into the Word document
    objDoc.Range.PasteExcelTable LinkedToExcel:=False, WordFormatting:=False, RTF:=False
    ' Save the Word document with the worksheet name
    objDoc.SaveAs "C:\ExcelDemy\" & ws.Name & ".docx" ' Replace with your desired file path
    ' Close the Word document
    objDoc.Close
    ' Clean up
    Set objDoc = Nothing
    Next ws
    ' Close Microsoft Word
    objWord.Quit
    ' Clean up
    Set objWord = Nothing
    Set objRange = Nothing
    End Sub

    After running the code, you will see the doc files created according to your dataset.

    output seperate doc files for each worksheet data

  4. Reply cropped Mehedi Hasan Shimul
    Mehedi Hasan Shimul May 28, 2023 at 3:02 PM

    Hi Anna!

    You wanted to say what will happen if we input the same word with Upper and Lower case. The fact is Excel counts Upper and Lower case characters as the same. So you won’t have any issues. Even then I am showing one way to make your data to proper format first. Then, use the formatted text in the required formula.

    • Just use the following formula to make words with a proper case.

    =PROPER(B5)

    proper case excel

    • Afterward, use the regular formula shown in the article.

    using formula for proper case text

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo