Input Data box open based on cells value condition unload in different cells

  • Hi All,

    Hope Everyone is all right.

    I have searched many forums the fact below that make me stuck. Hope someone here will help me.


    I have a Large datasheet. In this datasheet, I want to use input box code to simplify my data entry. But I am unable to do it on my own as I am not an expert. So I need Expert help.

    This is the table where the ROW heading is in ROW 8.


    BCDEFGAAAQ
    TypesOpen DateSavingLoan
    Debit12/12/202118/03/2022
    Credit11/11/202113/01/2022
    13/01/202020/11/2021


    In the above table when E column data is entered then an input box opens based on B column value.

    if B column value is Debit then the input box opens to ask for "Date of Loan Creation" after the date enter it unload in AQ Cell and will show a message as "Loan Creation date is 18/02/2022.

    if B column has Credit or nothing then the input box opens to ask for "Date of Savings Entry Creation" after the date enter it unload in AA Cell and will show a message as "Savings Entry date is 13/01/2022. All Date will be "dd/mm/yyyy"


    Hope I am able to describe the fact and someone will help me to ease my data entry.


    Thanks in advance.

  • Thanks royUK again.


    I am not very good at UserForm data entry, but is it possible to do it by VBA using input box data entry then it will be very easy for me to understand.


    Hope you understand my limitation.


    Thanks

  • Try this, paste the code to the Worksheet Object Module for the sheet concerned

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Thank you KjBox,


    It works as expected as I want and appreciate you for the code.


    By the way, Can a triple condition be applied in this code


    Like


    In the above table when E column data is entered then an input box opens based on B column value.

    Condition 1:if B column value is Debit then the input box opens to ask for "Date of Loan Creation" after the date enter it unload in AQ Cell and will show a message as "Loan Creation date is 18/02/2022.


    Condition 2: if B column has Credit or Other then the input box opens to ask for "Date of Savings Entry Creation" after the date enter it unload in AA Cell and will show a message as "Savings Entry date is 13/01/2022.


    Condition 3: if B column has Nothing then no input box opens or skip.


    Thanks and Best regards

  • This will now do nothing if Column B is empty for the target row.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Hi, KjBox,


    Thanks for your feedback,


    If you don't mind, I am asking what is code for condition 2.


    that is; Condition 2: if B column has "Credit or Other" then the input box opens to ask for "Date of Savings Entry Creation" after the date enter it unload in AA Cell and will show a message as "Savings Entry date is 13/01/2022.


    Hope you help me to understand.


    Thanks and best regards.

  • Like this?

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Hi, Kjbox,


    Thanks for your feedback again,


    Can I write code row 17 like below


    Code
    ElseIf Cells(Target.Row, 2) like "*" & "Credit" "*" or "*" & "Other" & "*" Then

    If not then how to write.


    Thank you.

  • Code
            ElseIf Cells(Target.Row, 2) Like "*Credit" Or Cells(Target.Row, 2) Like "*Other*" Then

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • You're welcome. I do think you should consider a User Form as a means of data entry, as suggested by royUK, the conditions needed and messages can easily be incorporated in the User Form code.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

  • Thanks, RoyUK and KjBox for the expert opinion.

    Can you give an example worksheet or sample file to understand how a user form entry works.


    Thanks and best regards,

  • Roy provided links to his web site where samples of user forms can be found.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!