User Posts: Shamima Sultana
0
How to Remove Filter in Excel (5 Easy & Quick Ways)
-1

In the Excel sheet, we do apply Filter to do an analysis of particular data. While showing the required data Filter hides other data. Anyone may need the other ...

0
How to Use VBA Mod Operator (9 Examples)
-1

The VBA Mod is not a function whereas MOD is a function in an Excel worksheet. VBA Mod is an operator which divides two numbers and returns the remainder. The ...

0
How to Trim Spaces in Excel (8 Easiest Ways)
-1

In Excel, while importing data from different sources or creating a dataset there stays a possibility of having extra unwanted spaces. Sometimes extra spaces ...

0
How to Use Calculated Field in Excel Pivot Table (8 Ways)
-1

In Excel you can create a Pivot Table from any dataset, Pivot Table is useful when you need a new data point that can be obtained by using existing data points ...

0
How to Split First And Last Name in Excel (6 Easy Ways)
-1

In Excel, you can split your full name into separate columns. There are a couple of ways to split first name and last name. You can use Excel inbuilt features ...

0
How to Use Less Than Or Equal to Operator in Excel (8 Examples)
0

Microsoft Excel has 6 logical operators which are also known as comparison operators. And Less Than or Equal to (<=) is one of them. The Less Than or Equal ...

0
How to Lookup a Table in Excel (8 Methods)
0

From a large dataset whenever you want to fetch or look up a particular value then you will need to know how to lookup the table (dataset) in Excel. In this ...

0
How to Create Excel Drop Down List with Color (2 Ways)
0

In your dataset when you have particular values that you will need to use multiple times then the Excel drop-down list will be helpful. In most cases, you may ...

0
How to Use COUNTIF for Unique Text (8 Easiest Ways)
0

In a large Excel dataset, it is very much possible to have duplicate values. Anyone often may be required to count unique values such as unique numbers or ...

0
How to Use Format Painter in Excel (7 Ways)
0

Whenever you need to copy format in Excel the Format Painter tool is the best to do it. It is used to change a string or cell content format with the same ...

0
How to Hide Duplicates in Excel (4 Ways)
0

While working in Excel, you may have duplicate values in your dataset. For any reason, if you need to hide those duplicate values or rows then you will be able ...

0
How to Calculate Time in Excel (17 Possible Ways)
0

It is possible to calculate time in Excel using arithmetic operations along with functions because in Excel dates and times are stored as numbers in the back ...

0
How to Use VBA DateValue Function in Excel (6 Examples)
0

In Excel, various people use different date formats so it is required to have any function to convert any formats into a standard date format. Whenever you ...

0
Example of Excel Data Table (6 Criteria)
0

In Excel, we apply basic to complex formulas. Depending on the scenario the use of the formula’s changes. In case you have any formula dependent on multiple ...

0
How to Use Excel INDIRECT Range (8 Easiest Ways)
0

The INDIRECT function (a Lookup & Reference function) is used to return the reference specified by the text string. This function is used to get values ...

Browsing All Comments By: Shamima Sultana
  1. Hi Arda
    Hope you are doing well.

    I checked the code you mentioned above and it works. To make it more clear I’m attaching some images with the code.

    Here, I tried the exact code in the same dataset.
    MsgBox Range("E5").End(xlToRight).Offset(0, 1).Address

    You can see the result $G$5.

    Again I changed the dataset slightly.

    Here, the result is also based on the location.

    NB. If it doesn’t help you then please send your dataset to [email protected] or [email protected]

    Thanks
    Shamima Sultana
    ExcelDemy

  2. Hello Nafez,

    You are most welcome and thanks for you invitation to visit Qatar.

    Regards
    ExcelDemy

  3. Hello May,

    The “Developer Tab” option is missing in default Excel versions. You can enable it from Excel Options. By following this article Display the Developer Tab you can enable it easily.

    Regards
    ExcelDemy

  4. Dear Laurie,

    You are most welcome.

    Regards
    ExcelDemy

  5. Dear Sovereign,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  6. Hello Sagar,

    You will get the solutions in the Excel file, which is given in the Download Practice workbook Section.

    Regards
    ExcelDemy

  7. Dear Anusha Uppuganti,

    You are most welcome. We are so glad that our article explanation helped you.

    Regards
    ExcelDemy

  8. Dear PK,

    Thanks for your appreciation. You are most welcome.

    Regards
    ExcelDemy

  9. Hello Tsegay Gebreselasie,

    Our aim is giving you the best Excel-related content like this.

    Regards
    ExcelDemy

  10. Dear Mark,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  11. Hello Rolan,

    Thanks for your suggestion. Article is updated.

  12. Hello Damien,

    From our Download Practice Workbook section, you will get the Excel file.

    If you face any difficulties after downloading the above file, follow this article to Enable Macros but Not Working

    Regards
    ExcelDemy

  13. Hello Taiwo,

    All the solution are available in the Excel Practice file section.

    We used this formula to get discount amount: =F5*IF(D5<1,0.03,0.05)

    Comment reply

    Regards
    ExcelDemy

  14. Hi viralTecho

    Thanks for your appreciation.

    Regards
    ExcelDemy

  15. Hello James Ward,

    To run the code from Excel you can follow these steps:
    Developer tab >> Macros >> Select any Sub Procedure from the list

    Comment reply

    Regards
    ExcelDemy

  16. Hello Hugh Richards,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  17. Dear Noe Albarran,

    You are most welcome.

    Regards
    ExcelDEmy

  18. Dear Yuan,

    Thanks for the suggestions. The code is updated you can check it now.

    Regards
    ExcelDemy

  19. Dear Amir

    You have to use either the combined formula or the vba code. Because converting number to words maintaing the place vaule is not possible by simple formula.

    Regards
    ExcelDemy

  20. Dear Ian Fisher,

    You are most welcome.

    Regards
    ExcelDemy

  21. Hello Viraltecho,

    You are most welcome.

    Regards
    ExcelDemy

  22. Hello Viraltecho,

    You are most welcome.

    Regards
    ExcelDemy

  23. Dear Roberto,

    You are most welcome.

    Regards
    ExcelDemy

  24. Dear Aubrey

    You are most welcome. Your appreciation means a lot to us.

    Regards
    ExcelDemy

  25. Dear Dilip Paunikar

    You are most welcome.

    Regards
    ExcelDemy

  26. Dear Soumendra

    You are most welcome.

    Regards
    ExcelDemy

  27. Hello Manwesh,

    You can state your problem in the comment section or in our ExcelDemy Forum.

    Regards
    ExcelDemy

  28. Dear Ashab,

    We do have a YouTube channel named ExcelDemy

    Regards
    ExcelDemy

  29. Dear Evangeline,

    Thanks for your appreciation. Our experienced writers write these questions after doing a complete research about the topic.

    Regards
    ExcelDemy

  30. Dear Jason,

    You are most welcome.

    Regards
    ExcelDemy

  31. Dear Ryan,

    Glad to hear that our article helped you.

    Regards
    ExcelDemy

  32. Dear Endashaw Balcha,

    To know more about excel formula you can explore our Excel Formulas category. From here you will get practical use of different formulas in different fields.

    Regards
    ExcelDemy

  33. Dear Raf,

    You are most welcome.

    Regards
    ExcelDemy

  34. Hello Muhammad Amin,

    Good to hear that. To get more helpful contents explore our site.

    Regards
    ExcelDemy

  35. Dear Jess,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  36. Dear Jimmy,

    You are most welcome.

    Regards
    ExcelDemy

  37. Hello y2mate,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  38. Dear ytMp3,

    Thank you so much.

    Regards
    ExcelDemy

  39. Dear Martin Carrion,

    You are most welcome.

    Regards
    ExcelDemy

  40. Dear Dina,

    Thank you so much for your appreciation.

    Regards
    ExcelDemy

  41. Dear Navini,

    You are most welcome.

    Regards
    ExcelDemy

  42. Dear Gopi Sahu,

    Thanks for reaching out to us. You will get various types of WFM related articles here Excel Solver

    If you need solution of any specific topic kindly comment down below.

    Regards
    ExcelDemy

  43. Dear Justice,

    You are most welcome.

    Regards
    ExcelDemy

  44. Dear Merry,

    You are most welcome.

    Regards
    ExcelDemy

  45. Dear Karen,

    You are most welcome.

    Regards
    ExcelDemy

  46. Hi Putul ch. Borah,

    Yes, you can do it by following the mentioned steps.

  47. Dear Tiago,

    You are most welcome.

    Regards
    ExcelDemy

  48. Dera Ashok,

    You are most welcome.

    Regards
    ExcelDemy

  49. Dear Foysal,

    You are most welcome.

    Regards
    ExcelDemy

  50. Dear kinyapreen,

    To get virtual lessons you can follow our youtube channel Youtube Channel

    Regards
    ExcelDemy

  51. Hello BART,

    It is possible to add a VB line of code to run the selection change code only when you click the tab of the worksheet called “index.” To achieve this, you can use the Worksheet_Activate event in the code module of the “index” worksheet. Here’s the code.

    Private Sub Worksheet_Activate()
        Dim mVCount As Integer
        Dim mHCount As Integer
        Dim mVBreak As VPageBreak
        Dim mHBreak As HPageBreak
        Dim mNumPage As Integer
        
        mHCount = 1
        mVCount = 1
        
        If ActiveSheet.PageSetup.Order = xlDownThenOver Then
            mHCount = ActiveSheet.HPageBreaks.Count + 1
        Else
            mVCount = ActiveSheet.VPageBreaks.Count + 1
        End If
        
        mNumPage = 1
        
        For Each mVBreak In ActiveSheet.VPageBreaks
            If mVBreak.Location.Column > ActiveCell.Column Then Exit For
            mNumPage = mNumPage + mHCount
        Next
        
        For Each mHBreak In ActiveSheet.HPageBreaks
            If mHBreak.Location.Row > ActiveCell.Row Then Exit For
            mNumPage = mNumPage + mVCount
        Next
        
        ThisWorkbook.Worksheets("Worksheet 1").Range("I2").Value = "Page " & mNumPage & " of " & Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
        ThisWorkbook.Worksheets("Worksheet 3").Range("C5").Value = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
    End Sub
    

    Regards
    Alif Bin Hussain

  52. Dear,

    You are most welcome.

    Regards
    ExcelDemy

  53. Dear Bart,

    You are most welcome. Sure, you can inform us.

    Regards
    ExcelDemy

  54. Dear Najeeburk,

    You are most welcome.

    Regards
    ExcelDemy

  55. Dear Danny Van Straten,

    If you need any types of customized templates you may contact us through [email protected]
    We have a expert team to create any types of professional templates.

    Regards
    ExcelDemy

  56. Hello Yaojm,

    Thanks for your suggestions. Here we focused on the comparison/difference of VLOOKUP and XLOOKUPp that’s why we didn’t improvised the use of VLOOKUP.

    Regards
    ExcelDemy

  57. Hello Pankaj,

    You are welcome.

    Regards
    ExcelDemy

  58. Dear Charlotte,

    You are most welcome.

    Regards
    ExcelDemy

  59. Dear Mustafa,

    You are most welcome.

    Regards
    ExcelDemy

  60. Hello Abubakar,

    You are most welcome. We hope so you will be able to create an interim certificate template following these steps.

    Regards
    ExcelDemy

  61. Dear B,

    You are welcome.

    Regards
    ExcelDemy

  62. Dear Akash,

    You are most welcome.

    Regards
    ExcelDemy

  63. Dear Carl,

    You are most welcome.

    Regards
    ExcelDemy

  64. Hello Dear,

    You can download the Cheat Sheet free of cost just by providing your valid email address. To get the files go to the “Download Excel Formulas Cheat Sheet PDF & Excel Files” section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  65. Dear Macel Williams,

    To customize any templates you can contact with us via this mail problem @exceldemy.com

    Regards
    ExcelDemy

  66. Dear Macel Williams,

    To customize any templates you can contact with us via this mail problem @exceldemy.com

    Regards
    ExcelDemy

  67. Dear Qasim,

    Thanks for your suggestions we have updated our Exercise 3 you can check it now.

    Regards
    ExcelDemy

  68. Dear Kenny H,

    This Email address is valid but if you face any problem you can post your problem in our ExcelDemy Forum.

    Regards
    ExcelDemy

  69. Dear Nikhil Pandey,

    You will get all the solutions in the workbook’s Solution sheet. Here I’m giving you the query answer for your understanding.

    The Formula is : =WEEKDAY(B5,11)

    Get-Weekday

    Regards
    ExcelDemy

  70. Dear Nikhil Pandey,

    You will get the solution sheet in the Download Practice Files section. Download the workbook there in Solution sheet you will get all the solutions. You you can get the workbook from this link Solution Sheet

    Regards
    ExcelDemy

  71. Dear Aiden,

    Yes you can do that.

    Regards
    ExcelDemy

  72. Dear Macel,

    You are welcome.

    Regards
    ExcelDemy

  73. Dear Marc,

    You are welcome.

    Regards
    ExcelDemy

  74. Dear Kim,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  75. Dear Prakash Tulsiani,

    You are most welcome.

    Regards
    ExcelDemy

  76. Dear Kay,

    To get a customized templates you can contact with us through this Email: [email protected]

    Regards
    ExcelDemy

  77. Hello Dear,

    You can download the Excel and PDF files free of cost just by providing your valid email address. To get the files go to the “Download Excel Formulas Cheat Sheet PDF & Excel Files” section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  78. Dear Nadew w/yesus,

    You are most welcome.

    Regards
    ExcelDemy

  79. Dear Dr,

    You are most welcome.

    Regards
    ExcelDemy

  80. Dear Adil Ahmed,

    You are most welcome.

    Regards
    ExcelDemy

  81. Dear Macel Williams,

    You are most welcome.

    Regards
    ExcelDemy

  82. Hello Dear,

    You can download the Cheat Sheet free of cost just by providing your valid email address. To get the files go to the “Download Excel Formulas Cheat Sheet PDF & Excel Files” section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  83. Dear Isaac,

    You are most welcome.

    Regards
    ExcelDemy

  84. Dear MADI,
    Thank you for following our article.
    To split into sheets based on certain row conditions, we have to enter an IF condition that checks if the row is of a certain colour. Here, I have added the code to do this.

    Sub SplitSheetByGreenColor()
        Dim Rng As Range
        Dim xRow As Range
        Dim SplitRow As Integer
        Dim xSheet As Worksheet
        Dim i As Integer
        Dim resizeCount As Integer
        
        On Error Resume Next
        xTitleId = "ExcelSplit"
        Set Rng = Application.Selection
        Set Rng = Application.InputBox("Range", xTitleId, Rng.Address, Type:=8)
        SplitRow = Application.InputBox("Row Number Split", xTitleId, 5, Type:=1)
        Set xSheet = Rng.Parent
        Set xRow = Rng.Rows(1)
        Application.ScreenUpdating = False
        
        For i = 1 To Rng.Rows.Count Step SplitRow
            resizeCount = SplitRow
            If (Rng.Rows.Count - xRow.Row + 1) < SplitRow Then resizeCount = Rng.Rows.Count - xRow.Row + 1
            
            If xRow.Cells(1).Interior.Color = RGB(0, 255, 0) Then
                xRow.Resize(resizeCount).Copy
                Application.Worksheets.Add after:=Application.Worksheets(Application.Worksheets.Count)
                Application.ActiveSheet.Range("A1").PasteSpecial
            End If
            
            For j = 2 To Worksheets.Count
            Worksheets(j).Name = "Green" & j - 1
            Next j
    
            Set xRow = xRow.Offset(SplitRow)
        Next
        
        Application.CutCopyMode = False
        Application.ScreenUpdating = True
    End Sub

    This code checks if the interior colour of the first cell in each row of the selected range is Green(RGB(0,255,0)). The entire row is copied and pasted into a new sheet if rows meet the condition. You can alter this colour condition according to your need.

    Regards
    Priti

  85. Dear Sara,

    You will find the solutions in the Excel file which is given in Download Practice Workbook section.

    Regards
    ExcelDemy

  86. Dear Sakshi,

    You are most welcome.

    Regards
    ExcelDemy

  87. Dear Md. Morshed Alam,

    You are most welcome.

    Regards
    ExcelDemy

  88. Dear Alex,

    Thanks for your feedback.

    Regards
    Exceldemy

  89. Dear Paresh Kanti Paul,

    We are glad to hear that.

    Regards
    ExcelDemy

  90. Hello Dear,

    You can download the Excel and PDF files free of cost just by providing your valid email address. To get the files go to the “Download Excel Formulas Cheat Sheet PDF & Excel Files” section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  91. Dear Sushil,

    You are most welcome.

    Regards
    ExcelDemy

  92. Dear Duncan R Walk,

    You are most welcome.

    Regards
    ExcelDemy

  93. Dear Bolajoko Olufemi,

    You will get all resources related to Data Analysis here All About Data Analysis. We are planning to launch courses as soon as possible.

    Regards
    ExcelDemy

  94. Dear Ronald,

    You are most welcome.

    Regards
    ExcelDemy

  95. Dear Ronhat Minmin,

    If you want to get the Excel File, you can download it from Download Practice Workbook

    Regards
    ExcelDemy

  96. Dear Ebrahim Ahmadi,

    You are welcome.

    Regards
    ExcelDemy

  97. Hello Dear,

    You can download the Excel and PDF files free of cost just by providing your valid email address. To get the files go to the “Download Excel Formulas Cheat Sheet PDF & Excel Files” section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  98. Dear Lin Giralt,

    You are most welcome.

    Regards
    ExcelDemy

  99. Dear Khin Soe,

    You are most welcome.

    Regards
    ExcelDemy

  100. Dear Tha’ir,

    You are most welcome.

    Regards
    ExcelDemy

  101. Dear Mohamad,

    Thanks for your appreciation

    Regards
    ExcelDemy

  102. Dear Minhajul,

    You are most welcome.

    Regards
    ExcelDemy

  103. Dear Sandeep Bhattacharjee,

    You are most welcome and thanks for your appreciation.

    Regards
    ExcelDemy

  104. Hello Sujay Jain,

    You can download the Excel and PDF files free of cost just by providing your valid email address. To get the files go to the Top 100 MCQ of Excel section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  105. Dear S Roy,

    You are most welcome.

    Regards
    ExcelDemy

  106. Hi Kazem,

    You are welcome.

    Regards
    ExcelDemy

  107. Dear Lana,

    You are most welcome.

    Regards
    ExcelDemy

  108. Dear Seamus Madden,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  109. Hi Ndonwi,

    Thanks

  110. Dera Merc,

    You are most welcome.

    Regards
    ExcelDemy

  111. Dear Joanna,

    You are most welcome.

    Regards
    ExcelDemy

  112. Dear Richard,

    You are most welcome.

    Regards
    ExcelDemy

  113. Dear Andrei,

    These functions are available in WPS office.

    Regards
    ExcelDemy

  114. Dear Kapil,

    You are most welcome.

    Regards
    ExcelDemy

  115. Dear Tommy Fuifui,

    You are most welcome.

    Regards
    ExcelDemy

  116. Dear Excel Nob,

    You are most welcome.

    Regards
    ExcelDemy

  117. Dear Car,

    You are most welcome.

    Regards
    ExcelDemy

  118. Dear Jamie,

    You are most welcome.

    Regards
    ExcelDemy

  119. Dear Anitelleth,

    You are most welcome.

    Regards
    ExcelDemy

  120. Dear Anitelleth,

    You are most welcome.

    Regards
    ExcelDemy

  121. Dear Kay,

    You are welcome.

    Regards
    ExcelDemy

  122. Dear Pirooz Rahimi,

    You are most welcome and thanks for your appreciation.

    Regards
    ExcelDemy

  123. Dear Abel,

    Thanks for your appreciation. You are most welcome.

    Regards
    ExcelDemy

  124. Dear Kh Paydar,

    You are most welcome.

    Regards
    ExcelDemy

  125. Dear Joris,

    You are most welcome. We are glad to hear that.

    Regards
    ExcelDemy

  126. Dear Raja,

    You are most welcome.

    Regards
    ExcelDemy

  127. Dear Kapil,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  128. Dear Polepeddi Sasidhar,

    We are glad to hear that.

    Regards
    ExcelDemy

  129. Hello Silpa,

    You can download the Excel and PDF files free of cost just by providing your valid email address. To get the files go to the “Download Excel Formulas Cheat Sheet PDF & Excel Files” section of this post and enter your email address. Then check your email immediately after to get the download links.

    Best Regards
    ExcelDemy

  130. Dear Jidith Savidge,

    You are most welcome.

    Regards
    ExcelDemy

  131. Dear Ajij Nadaf,

    We will love to give you suggestions. kindly share your problem.

    Regards
    ExcelDemy

  132. Good day, Daniel,

    The issue you’re having might be because your workbook’s data range differs from the data range specified in our code.

    Change the data range according to your worksheet.

    This might be the solution to your issue. I’d appreciate it if you could send me the worksheet you’re working on so that I can better understand your issue and give you an exact solution.

    Regards
    Sakibul Hasan Nahid | ExcelDemy Team

  133. Hey Philip,

    Thanks for your response. You can use the SORT and FILTER functions along with the LARGE function to solve your problem.
    Here’s the practice sheet we used. You can check it out for a better understanding.
    SORT-FILTER.xlsx
    You can also check out this article for more detailed explanations.
    https://www.exceldemy.com/excel-top-10-list-with-duplicates/

    Regards
    Hassan Shuvo| ExcelDemy Team

  134. Hello Chandan,

    Thanks for commenting. If I’m not wrong, you want to match the dataset like the one below.

    Select the entire dataset without the heading then go to conditional formatting >> New Rule

    Then select “Use a formula to determine which cells to format.”
    In the formula bar, enter the following formula:
    =AND(A3<>B3,C3<>B3)
    Press OK

    Here, “A3” represents the cell containing the customer name, “B3” represents the cell containing the ID name, and “C3” represents the cell containing the real name. You can adjust the cell references based on your data.
    Choose the formatting option that you want to use for the highlighted rows. For example, we took light green color here for highlighting.
    The final outcome will look like the image below.

    I hope this answer will help you to identify matched names. Please let us know if you have any other queries. Also, you can post your Excel-related problem in ExcelDemy Forum with images or Excel workbooks.

    Regards
    Mizbahul Abedin | ExcelDemy Team

  135. Dear MD. KAMAL HOSSAIN,

    To obtain your required format please follow the following simple steps:
    From your Excel Workbook, press ALT + F11 to open Visual Basic Editor.
    Insert a module.
    Paste the following code:

    Function NumberToWords(ByVal Number As Long) As String
        Dim Ones() As String
        Dim Tens() As String
        Dim Group() As String
        Dim Result As String
        
        Ones = Split("One,Two,Three,Four,Five,Six,Seven,Eight,Nine", ",")
        Tens = Split("Ten,Eleven,Twelve,Thirteen,Fourteen,Fifteen,Sixteen,Seventeen,Eighteen,Nineteen", ",")
        Group = Split("Twenty,Thirty,Forty,Fifty,Sixty,Seventy,Eighty,Ninety", ",")
        
        If Number = 0 Then ' Handle zero
            Result = ""
        ElseIf Number < 10 Then
            Result = Ones(Number - 1)
        ElseIf Number < 20 Then
            Result = Tens(Number - 10)
        ElseIf Number < 100 Then
            If Number Mod 10 = 0 Then ' Handle multiples of 10
                Result = Group(Int(Number / 10) - 2)
            Else
                Result = Group(Int(Number / 10) - 2) & " " & Ones(Number Mod 10 - 1)
            End If
        ElseIf Number < 1000 Then
            Result = Ones(Int(Number / 100) - 1) & " Hundred " & NumberToWords(Number Mod 100)
        ElseIf Number < 1000000 Then
            Result = NumberToWords(Int(Number / 1000)) & " Thousand " & NumberToWords(Number Mod 1000)
        ElseIf Number < 1000000000 Then
            Result = NumberToWords(Int(Number / 1000000)) & " Million " & NumberToWords(Number Mod 1000000)
        Else
            Result = "Number is too large."
        End If
        
        NumberToWords = Trim(Result)
    End Function

    Now, return to your worksheet. Type in the following formula in the cell where you require the output and press Enter key.
    =NumberToWords(B5) & ” Taka Only”
    Here, B5 indicates the reference of the cell where you have the input number.

    converting numbers to words

    I hope this solution will be sufficient for your requirements. Let us know your feedback.

    Regards,
    ExcelDemy

  136. Dear Rich Saunders,

    Query 1: The method 7 works just fine. If you write March in F4, you will get the values for that month as well.

    Query 2: The formula is universal for any Excel version. If you write the formula in any cell the formula will get you the entire row value for the name you will write in the F4 cell. For example, if you write “Nathan” in F4 cell and paste the formula in the A1 cell then the formula will write the values of the entire row( B8:D8) in the A1:A3 range.
    Yes, we should have mentioned the Ctrl+Shift+Enter in the article. We will make sure of that in the next articles. As we used Microsoft 365 so it works by pressing Enter. We are sorry for that.

    Regards
    ExcelDemy

  137. Dear Tudor,

    Hope you are doing well. Answer of your questions are given below with explanation.

    1. How can I change the month and day from English to Romanian?

    Select the cell with month and date, cell C7 in our case.
    Right-click with the mouse and select Format Cells.

    monthly staff attendance

    In the Format Cells window, select Romanian (Moldova) under the Locale menu.
    Then, select any type under the Type menu and click the OK button.

    The month and date are changed into Romanian from English. Do the same process for cell E7.

    2. If an employee works on Saturday and/or Sunday, how can I collect those weekend hours separately, in a cell?

    Let’s say the first employee works on Saturday and Sunday for 5 and 6 hours respectively. He works on 4 weekends which you can see in the picture. To sum these values we’ll use the SUMIFS function.
    Apply the formula in any cell where you want the weekend hours, let’s say cell AM11-
    =SUMIFS($F$11:$AJ$11,$F$11:$AJ$11,"<>P",$F$11:$AJ$11,"<>A")

    After pressing Enter you’ll get the total weekend hours. You can use the Fill Handle tool to apply this formula to other employees.

  138. Dear Aspen,

    You are most welcome.

    Regards
    ExcelDemy

  139. Thanks for your suggestions.

  140. Dear Victor,

    You are most welcome.

    Regards
    ExcelDemy

  141. Dear Elizabeth,

    You are most welcome. We are so glad that our article fulfilled your need.

    Regards
    ExcelDemy

  142. Dear Anjli Gupta,

    Answers are given in the Solution sheet of Excel File which is in Download Practice Workbook section.

    Soluation-of-Advanced-MCQs-for-Exam

    Regards
    ExcelDemy

  143. Dear HG,

    You are most welcome.

    Regards
    ExcelDemy

  144. Dear Seaunders,

    Thanks for your appreciation. It means a lot to us.

    Regards
    ExcelDemy

  145. Dear Gunawan,

    Thanks for your suggestions. We updated the article. You can check it now.

    Regards
    ExcelDemy

  146. Hi Fake Hidden,

    Thanks for your suggestions. We updated our article so that it fulfills the need of all types of readers. You may check our article now and let us know any kinds of suggestions.

    Regards
    ExcelDemy

  147. Dear Rafi,

    Thanks for your appreciation.

    Regards
    ExcelDemy

  148. Dear Elly,

    Thanks for your appreciation. We re-explained our formulas to make them more understandable. If you find any difficulty now, let us know in the comment section below.

    Regards
    ExcelDemy

  149. Dear Rashmi,

    You are most welcome.

    Regards
    ExcelDemy

  150. Dear Jay Dee,

    That’s good to hear. We are interested to know more from you.

    Regards
    ExcelDemy

  151. Dear Silver,

    You are most welcome.

    Regards
    ExcelDemy

  152. Dear William B,

    You are most welcome.

    Regards
    ExcelDemy

  153. Dear Eugen Safta,

    You are most welcome.

    Regards
    Shamima Sultana | ExcelDemy

  154. Dear Radu,

    Thanks for your suggestion and we appreciate it. We updated the cell range.

  155. Dear Sanket,

    Thanks for your appreciation.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  156. Dear Yar Zar Htun,

    You are most welcome. We are glad that through ExcelDemy you are improving your skill.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  157. Dear Vivasvan,

    You are most welcome. It’s great to know that our article helped you to complete your project.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  158. Dear Bo Thibaut,

    We are willing to do any Excel-related projects. Kindly share your requirements through this Email: [email protected]

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  159. Hi Robert Bakinam,

    Here, you will get the full copy in pdf Marking Result Sheet.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  160. Dear German,

    You are most welcome. To get solutions with detailed explanations, follow ExcelDemy.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  161. Dear Kirsten Wheeler,

    Thanks for your appreciation. To get solutions with detailed explanations, follow ExcelDemy.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  162. Dear NancyM,

    Thanks for your appreciation. To get solutions with detailed explanations, follow ExcelDemy.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  163. Dear CJvW,

    Thanks for your appreciation. To get more helpful content be with ExcelDemy.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  164. Dear Geogre,

    Thanks for your kind attention and suggestion. We updated it.

  165. Dear Michael Gamal Aziz,

    You are most welcome.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  166. Dear Glenn,

    We are glad to hear that. ExcelDemy is trying hard to give you quality content.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  167. Dear Uday Kumar,

    We are working on your problem. We will appreciate you to post your problem in our ExcelDemy Forum.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  168. Dear Ramandeep Kaur,

    Thanks for your appreciation. Sooner we will make another exercise based on Basic and Advanced Formulas.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  169. Dear Datla Srinivas,

    We are working on your requirements. We hope we will come back to you with your expected solutions.

    Regards
    Shamima Sultana
    Project Manager | ExcelDemy

  170. Dear Mody,

    Thanks for your appreciation.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  171. Hello Joanie,

    You are most welcome.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  172. Dear Map,

    Thanks for your appreciation and suggestion. Sooner we will write an article regarding this topic.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  173. Dear Ven Upekkha,

    Thanks for your appreciation.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  174. Dear Rajesh,

    You are welcome.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  175. Dear umit,

    Thanks for your appreciation it means a lot to us.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  176. Hello Zuri,

    Thanks for your suggestion.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  177. Dear Carl,

    Thanks for your appreciation. ExcelDemy is glad to help you.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  178. Dear Sandra Aldridge,

    Thanks for your appreciation it means a lot to us. ExcelDemy is glad to help you.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  179. Dear Micah,

    Thanks for your kind words. ExcelDemy is dedicated to provide solutions to help you.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  180. Dear Mukibul Hasan,

    Thanks for your appreciation. Stay in touch with ExcelDemy.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  181. Dear Shanmuga Raja V S,

    Thanks for your appreciation. Stay in touch with ExcelDemy.

    Regards
    Shamima Sultana | Project Manager | ExcelDemy

  182. Dear Adam,

    Thanks for your appreciation.

    Shamima | Project Manager | ExcelDemy

  183. Dear Zidane,

    Thanks for your appreciation.

    Shamima | Project Manager | ExcelDemy

  184. Dear Kayla,

    Thanks for your appreciation and we are glad that our Dataset Template helped you.

    Regards
    Shamima | Project Manager | ExcelDemy

  185. Hello Uday Kumar,

    Kindly check the reply to your previous comment. We have given you a non-macro solution.

  186. Dear Forte,

    Thanks for your appreciation. Stay in touch with ExcelDemy to get more helpful content.

    Regards
    Shamima | Project Manager | ExcelDemy

  187. Dear Gilson,

    Thanks for your appreciation. Stay in touch with ExcelDemy to get more helpful content.

    Regards
    Shamima | Project Manager | ExcelDemy

  188. Dear Gerry Conroy,

    You are most welcome.

    Regards
    Shamima | Project Manager | ExcelDemy

  189. Dear Syed Anwar Hussain,

    Thanks for your appreciation.

    Regards
    Shamima | Project Manager | ExcelDemy

  190. Hello, Xzavier!

    For better understanding, we updated the article. Kindly check it now it would be helpful.

    Regards
    ExcelDemy

  191. Hello, An!

    You are most welcome. To get helpful content follow ExcelDemy.

    Regards
    ExcelDemy

  192. Hello, James!

    Your appreciation means a lot to us. To have a more wonderful experience follow ExcelDemy.

    Regards
    ExcelDemy

  193. Hi Rassulsson!

    Thanks for your appreciation.

    Regards
    ExcelDemy

  194. Thanks, Michael, for your query. From your comment, it seems that you want to permanently assign the replacing dataset (denoted by Reprng in the code) instead of taking them in a prompted input box. You can do that by following the steps below.

    1. First, set a Name to the range that contains the Find & Replace with columns (In this case E5:F6). To do that, select the range and type a suitable name on the Name Box. Suppose you give the name “Find_Replace_Array”
    2. Now, open a new module and write the given code of method 1.
    3. Then, on the code, replace the line :

    Set Reprng = Application.InputBox(“Replace with: “, Title, Type:=8)

    With the following line.

    Set Reprng = Range(“Find_Replace_Array”)

    Now, if you run the code, you will only need to select the range where you want to replace values and it will automatically replace the values for you. Here, you will not be required to manually input the address of Find_Replace_Array.

    Hope it does the job for you. If you have any further queries, do let us know. Moreover, if your problem persists, you can post your problem in our Exceldemy Forum along with your Excel file.

  195. Hello, Hamza!

    Thanks for your appreciation. We are glad that our article helped you.

    Regards
    ExcelDemy

  196. Hello, A!

    If your file is protected by using Encrypt with Password feature then it won’t work. We mentioned it in the Things to Remember section.

    Regards
    ExcelDemy

  197. Hello, Nabil sellami!

    Thanks for your appreciation. To get more enjoyable articles stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  198. Hello, JeteMc!

    Welcome, JeteMc. To get more helpful information stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  199. Hello, Helen!

    Thanks for your appreciation. To get more helpful information stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  200. Hi, Irene!

    Thanks for your appreciation. To get more helpful information stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  201. Hi, Elton!

    Thanks for your appreciation. We will try to launch pdf files.

    Regards
    ExcelDemy

  202. Hello, Muhammad Luqman!

    You can download it from Download Excel Formulas Cheat Sheet PDF section.

    Regards
    ExcelDemy

  203. Hi, Bosco!

    Thanks for your appreciation. To get more informative contents stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  204. Hello, Joe Smith!

    The 64-bit version of Excel is not compatible with 32-bit active x controls. To know more about it you can visit this site

    Regards
    ExcelDemy

  205. Hello, Aleksandra!

    Thanks for your appreciation.

    Regards
    ExcelDemy

  206. Hello, Bennie!

    Thanks for your appreciation.

    Regards
    ExcelDemy

  207. Hello, Harry!

    You can download the copy from Download Sample Workbook

    Regards
    ExcelDemy

  208. Hello, Emil Lazar!

    Thanks for your appreciation. Stay in touch with ExcelDemy to get more useful articles.

    Regards
    ExcelDemy

  209. Hi Abishek Sharma!

    If you want the Excel file then you can download it from the Download Practice Workbook section. Or you need other assistance you can comment or send us mail at [email protected]

  210. Hello, Nastaran!

    Thanks for your appreciation. We are glad that our post helped you.

    Regards
    ExcelDemy

  211. Hello, Ruben!

    It’s glad to know that our content is helpful to you. To know more about Excel stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  212. Hello, Tanael Wawe!

    You are welcome. Stay in touch with ExcelDemy to get more helpful content.

    Regards
    ExcelDemy

  213. Hello, Tanael Wawe!

    Thanks for your appreciation. Stay in touch with ExcelDemy to get more helpful content.

    Regards
    ExcelDemy

  214. Hello, Dan!

    Thanks for your appreciation. It means a lot.

    Regards
    ExcelDemy

  215. Hello, Ahnaf!

    You are most welcome. stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  216. Hello, Aleem!

    Thanks for your appreciation. stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  217. Hello, Mohan!

    Thanks for your appreciation. Stay in touch with ExcelDemy for more helpful content.

    Regards
    ExcelDemy

  218. Hello, Many!

    You are most welcome. To get more helpful content with explanations stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  219. Hello, ExcelAmateur!

    Thanks for your appreciation. To get more helpful content with explanations stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  220. Hello, Mubashir!

    Thanks for your appreciation. To get more helpful content stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  221. Glad to hear that.

    Regards
    ExcelDemy

  222. Thanks for your appreciation.

    Regards
    ExcelDemy

  223. Hello!

    Thanks for your appreciation.

    Regards
    ExcelDemy

  224. Hello, Andy W!

    Thanks for your appreciation.

    Regards
    ExcelDemy

  225. Hi, Dhaval!

    Thanks for your appreciation.

    Regards
    ExcelDemy

  226. Hello, Pankaj!

    We are glad to know that it worked for you. To get more useful content stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  227. Hello, Suzette!

    Thanks for your appreciation. We will try to use fonts that will be easier to read for old eyes.

    Regards
    ExcelDemy

  228. Hello, Eric!

    Thanks for your appreciation. To get more helpful content stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  229. Hello, Instast!

    Thanks for your appreciation. To get more helpful content stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  230. Greetings ASHISH PANT,
    I appreciate you asking this question. We use the Microsoft Office 365 version here. In order to resolve your problem, you need to open the Excel workbook in Microsoft Office 365 version.

    Regards
    ExcelDemy

  231. Hello, Andre!

    Thanks for your appreciation. To get more helpful posts stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  232. Hello, Michelet!

    Thanks for your appreciation. Stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  233. Hello, Im!

    Hope you are doing well. Thanks for your appreciation.

    Regards
    ExcelDemy

  234. Hello, Leslie!

    Hope you are doing well. Thanks for your appreciation. Stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  235. Hello, Aston!

    Hope you are doing well. To show your data labels in millions kindly follow this article Millions in Data Labels

    Regards
    ExcelDemy

  236. Hello, Chan!

    Hope you are doing well. Glad to know that our content is useful for you.

    Regards
    ExcelDemy

  237. Hello, Kim!

    Thanks for your appreciation. For more useful content visit our site ExcelDemy.

    Regards
    ExcelDemy

  238. Hello, Suki Nasoordeen!

    Thanks for your appreciation. Stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  239. Hello Gerald,
    Do you need to know the conversion from Excel to PDF? Right? Because the original bank statement was in PDF format. So, here you can follow the steps below to convert your Excel file back to PDF file.
    Firstly, you need to open your Excel file.
    Secondly, click the File button at the top-left corner of the Excel file.

    edit bank statement, converting Excel into PDF

    Thirdly, go to Save As and click it.

    edit bank statement, conversion

    Fourthly, choose PDF from the Save option at the top-right corner by clicking the drop-down button.

    conversion from Excel to PDF

    Finally, choose a particular location to keep it by selecting Browse button.

    conversion from Excel to PDF

    Thanks
    Regards
    ExcelDemy

  240. Hello, Chole Faulkner!

    Thanks for your appreciation. Stay in touch with ExcelDemy.

    Regards
    ExcelDemy

  241. Hello, SS!

    Hope you are doing well. We are very sorry that you are facing some troubles with advertising. But will try our best to give you a nicer experience.

    Regards
    ExcelDemy

  242. Hi Zidane

    Hope you are doing well. Thanks for your appreciation.

    Regards
    ExcelDemy

  243. Hi Peter

    Thanks for your appreciation.

    Regards
    ExcelDemy

  244. Hi Mohammed Hassen,

    Thank you so much.

    Thanks
    Regards
    ExcelDemy

  245. Hi N,

    Thanks for your appreciation. Please visit our site for more excel-related problems.

    Thanks

    Regards
    ExcelDemy

  246. Hi Bernadeth,

    Thanks for your appreciation. To get more useful content kindly visit our site.

    Thanks
    Regards
    ExcelDemy

  247. Hi GIRIDAR N,

    Thanks for your appreciation and we are glad to help you. For any types of Excel-related problems kindly reach out to us.

    Regards
    ExcelDemy

  248. Hello Marian,

    There are some unwanted issues that may arise while dealing with the VBA code. In that case, you need to utilize the following code.

    Sub Extract_Data_from_PDF()
    
    Dim MyWorksheet As Worksheet
    
    Set MyWorksheet = ActiveWorkbook.Worksheets("Sheet1")
    Application_Path = "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe"
    PDF_Path = "C:\Users\USER\Desktop\Durjoy\Comments\New folder\standardnormaltable.pdf"
    
    Shell_Path = Application_Path & " """ & PDF_Path & """"
    Call Shell(pathname:=Shell_Path, windowstyle:=vbNormalFocus)
    
    Application.Wait Now + TimeValue("0:00:03")
    
    SendKeys "%vpc"
    SendKeys "^a"
    SendKeys "^c"
    
    On Error Resume Next
    Range("A1").PasteSpecial
    
    Call Shell("TaskKill /F /IM Acrobat.exe", vbHide)
    
    End Sub

    Here, the Application path and pdf path need to be defined accurately. Then, when you run the code, you will find the copied items in the clipboard.
    Then, click on Paste all to extract values.

    null

    Thanks
    Author, ExcelDemy

  249. Hi Exceler,

    Here, I tried the first method for 50 sets of data and it worked but you have to change the cell references based on your dataset. For your better understanding, I am attaching the images along with the formula.
    =INDEX($D$5:$D$30,MATCH(1,MMULT(--($B$5:$C$30=F5),TRANSPOSE(COLUMN($B$5:$C$30)^0)),0))

    The images of datasets

    Image of dataset

    Here, I used the formula for the entire dataset. I changed the references based on my dataset.

    Formula

    Output for 50 values:

    Output

    Note: If your dataset is very large kindly send us your dataset

    Thanks
    Shamima Sultana

  250. Hi Tom Lynham

    Hope you are doing well. Here, I updated the article which implies the title and the explanation.

    By following above explained methods it is possible to print colorful gridlines but you must use a color printer.

    If this update doesn’t help you or you have further queries kindly let us know.

    Thanks
    Shamima Sultana

  251. Hello Mark,

    We uploaded the Excel files again, you can check these files also. If you find any difficulty opening the file let us know.

    Thanks

  252. Hello Mark,
    Hope you are doing well.
    Whenever I try to download this workbook it works fine without a password. To be reassured a couple of my teammates also downloaded this file they also didn’t face any difficulty.
    As I haven’t used any password for this worksheet. I really want to know what caused such issues while you downloaded the file.
    Here, I will show you what it looks like when I download the file again.

    After downloading the file Excel shows a warning message. You have to click on Enable Editing.

    Excel sheet name in formula dynamic

    Later, the downloaded file will be available to use or you can make any changes you want.

    Solution

    N.B. If this solution doesn’t work for you. Kindly sent me the screenshots of the problem.

    Thank you.

    Regards
    Shamima Sultana

  253. Hi Froggy,
    Hope you are doing well. Thanks for reaching out to us with your issue.

    As you intend to apply the above code to a workbook with multiple sheets so you need to add some extra lines in your code to define all available worksheets or selected worksheets.

    Here, I will give you two solution
    1. For selected sheets
    2. For all the available sheets in a workbook

    1. If you want to apply the same code in some selected sheets then use the code given below where I declared sheets names by using an Array.

    Option Explicit
    Sub AddSpaceBetweenRows()
    Dim all_sheets As Worksheet
    Dim rng As Range
    Dim i As Long
    Dim all As Variant

    Set all = sheets(Array(“VBA1”, “VBA2”))

    For Each all_sheets In all
    all_sheets.Select
    Set rng = Range(“B5:E9”)
    For i = rng.Rows.Count To 2 Step -1
    rng.Rows(i).EntireRow.Insert
    Next i
    Next
    End Sub

    2. To loop through all the available sheets of your workbook you will need to use the code given below where I declared all_sheets and used an extra For Loop.

    For your better understanding, I’m providing the modified code here,

    Option Explicit
    Sub AddSpaceBetweenRows()
    Dim all_sheets As Worksheet
    Dim rng As Range
    Dim i As Long

    For Each all_sheets In Worksheets
    all_sheets.Select
    Set rng = Range(“B5:E9”)
    For i = rng.Rows.Count To 2 Step -1
    rng.Rows(i).EntireRow.Insert
    Next i
    Next
    End Sub

    Note: Based on your Excel file you will need to change the sheet name and the cell range selection.

    For further queries comment down below.

  254. Hello Naveed,

    Hope you are doing well. Kindly send me the details of your problem including the Excel file via my Gmail account [email protected]

    Thank you

  255. Hi Helen,
    I’m glad that our article helped you. For any types of Excel related problems kindly check out our ExcelDemy site.

    Thanks
    Shamima

  256. Hello Michelle,
    Hope you are doing well. If you need to run the macro after the first use it will create new sheets with the updates you made on your dataset.

    It won’t automatically update the workbooks created previously (Book1, Book2, and Book3) rather it will create Book4, Book5, and Book6 with the updated dataset.

    Thanks
    Shamima Sultana

  257. Hi A,

    Thanks for your appreciation.

  258. Hi Sikander,
    Hope you are doing well.
    To get the DateValue for February, click on the drop-down option of Month and then select February.

    monthly staff attendance

    Then you will get the DateValue and the rest will be updated automatically.

    2. Monthly Stuff Attendance

    Note: If you want to type the month name in that cell you have to be careful with the spelling of the month name.

    Thanks

    Regards
    Shamima Sultana

  259. Hi Deon Bailey,
    Hope you are doing well. Thanks for reaching out to me with your issue.

    As you didn’t share your Excel file that’s why it is hard to understand your sheet name and where is the problem occurring.

    But you need not to worry, I’m giving you a possible solution so that you can add data to your selected sheet to the last row.

    The reason for overwriting the added data is your code wasn’t finding the last row it was showing 1 as the last row number.

    Here, I added data according to my dataset I used in this article. I commented out your code and added some required lines.

    Sub Insert_Value_from_LastRow()

    ‘TargetSheet = Cmb_Months.Value
    ‘If TargetSheet = “” Then
    ‘Exit Sub
    ‘End If
    Dim targetSheet As Worksheet
    Set targetSheet = ThisWorkbook.Worksheets(“Dataset”)
    targetSheet.Activate
    ‘lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
    LastRow = ActiveSheet.UsedRange.Rows(ActiveSheet.UsedRange.Rows.Count).Row
    MsgBox LastRow

    ‘ActiveSheet.Cells(LastRow + 6, 2).Value = Cmb_Area.Value
    ‘ActiveSheet.Cells(LastRow + 6, 3).Value = Txt_Ln_Manager.Value
    ‘ActiveSheet.Cells(LastRow + 6, 4).Value = Txt_FName.Value
    ‘ActiveSheet.Cells(LastRow + 6, 5).Value = Txt_Surname.Value
    ‘ActiveSheet.Cells(LastRow + 6, 6).Value = Txt_S_Number.Value

    ActiveSheet.Cells(LastRow + 3, 2).Value = “Rachel Ross”
    ActiveSheet.Cells(LastRow + 3, 3).Value = “Germany”
    ActiveSheet.Cells(LastRow + 3, 4).Value = “laptop”
    ActiveSheet.Cells(LastRow + 3, 5).Value = 4567

    End Sub

    Note: Whenever you want to insert or add data after a particular row it is better to see the last row number by using MsgBox. It will help you to understand why data is overlapping.

    I also added the images.

    reply of comment

    reply of comment

    For further queries, you can send me your Excel file.

    Thanks
    Shamima Sultana

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo