I have added a User Form to an excel spreadsheet that asks a user a question and adds it to a new row in a spreadsheet.
Each column in the spreadsheet has its own formula that calculates based off user input.
Is there a way that I can have excel automatically "pull" the formula that is contiguous in the column into the added row?
I imagine that I can change it in the code for my User Form, so when a person hits "Submit" all the cells update. But I only know how to update the value, not add a formula in place. Here is part of the code I have:
.Cells(iRow, 6).Value = Me.TextBox1.Value
.Cells(iRow, 7).Value = Me.TextBox2.Value
.Cells(iRow, 8).Value = Me.TextBox3.Value
.Cells(iRow, 9).Value = Me.TextBox4.Value
.Cells(iRow, 10).Value = Me.TextBox5.Value
.Cells(iRow, 11).Value = Me.TextBox6.Value
.Cells(iRow, 12).Value = Me.TextBox7.Value
.Cells(iRow, 13).Value = Me.TextBox8.Value
.Cells(iRow, 14).Value = Me.TextBox9.Value
.Cells(iRow, 15).Value = Me.TextBox10.Value
Is it possible to add something to change the cell values 1-4? Maybe like this:
.Cells(iRow, 1).Value = *insert formula here*