• Subtracting the value in column J from column I (=I2-J2) entering results in K2 with CmdButton click

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Subtracting the value in column J from column I (=I2-J2) entering results in K2 with CmdButton click

    • This topic has 0 replies, 1 voice, and was last updated 7 years ago.
    Author
    Topic
    #1773227

    Hi experts,

    Hope you’re having a good day.

    I am using a form to enter data in a worksheet. In column I and J there are numbers. How can I subtract the value in column J from column I and enter that value in column K with the click of a command button. The command button also enters data in columns A-H.

    Initially, I entered =I2-J2 in the worksheet and added it down 200 rows (currently I have data for 100 rows). That works, but the code: iRow = ws.Cells.Find(what:=”*”, SearchOrder:=xlRows, _ SearchDirection:=xlPrevious, LookIn:=xlValues).row + 1, causes new data to be entered at row 201 and leaves a big gap in the worksheet.

    I hope my explanation is adequate.

    Thanks in advance for your help!

    Reply To: Subtracting the value in column J from column I (=I2-J2) entering results in K2 with CmdButton click

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: