Auto Data Input

  • Hi


    I want some solution, Hope someone will help me.


    NameCell NumberAmountMonthScore
    Roy123455000.00July90
    Ovi67894000.00August80
    Imtiaz901233000.00September85
    Roy123455000.00October90
    Ali23459000.00November95
    Omar67890800.00December100
    Ali23459000.00January95


    You see there is some common name in the first column.

    Is there any way that

    if I input any name in the first column which data is already above then the 2nd " Cell Number", 3rd column "Amount" and 5th Column "Score" data automatically fill-up the blanks cell of the matched name row.

    Can It be done with VBA code? If then Help me. I will be very grateful.

    It's a sample file format. My datasheet is actually large.


    Hope Some one help me

  • Have a try with this macro to be placed in the sheets module.

  • Thanks, Rollis 13 for your help.


    That's works as expected as I want.


    But I have a problem with the worksheet that is, There is already a Private Sub WorkSheet_Change(ByVal Target As Range)

    So how to add this code to the same worksheet? Help.


    And along with this code Now the same month entry. Help.

    Accepted Date (dd/mm/yyyy) ( F )Voucher Number ( G )Voucher Date ( H )
    12/12/2020T-3620/12/2020
    20/11/2020T-12321/12/2020
    13/12/2020T-3620/12/2020


    The accepted Date Column is "F1: F".

    If a Month of date (12/12/2020 and 13/12/2020) is found same then auto-fill data from above if data exist.


    Thanks and much appreciate your work.

  • The relevant part of my macro is all in the 'If/Then/End If' so all you have to do is add it to your macro, where depends on how your's is structured, maybe just before your 'End Sub'.

    Since I have no idea how your project is structured, I believe that a solution for your second request would be the same, create and add a new 'If/Then/End If' and in it change the references to columns and rows.

  • The first help request is solved as per your suggestion.


    For the second, as you see the date is on a monthly basis. If the Date entry is in between the same month & year of any of the above then it will fill the respected cell.


    I tried but It only fills only the exact match date.


    Thank you so much.

  • If I correctly understood your request, could be:

    Note that I also added Event checking to avoid redundant triggering.

  • Thanks for your support.

    Works Good, but only one problem, Both 12/11/2020 and 12/11/2019 return the same result.

    Can It check both month & year at the same time to return value from the above?


    Thank you so much.

  • It's tricky to use 'Find' with both month and year due to local formatting of dates so I had to change approach, try with this: