I'm having a really hard time finding a light (computacional wise) way to find a value in a cell and replacing all values on the row this value appear. I tried to use the match function, but to no avail, as I'm a begginer in VBA. I use the following code to create a new row and fill all the collumns needed (shortened, as the full code is really long):
"Private Sub UpdateButton_Click()
Dim myRow As ListRow
Dim intRows As Integer
intRows = ActiveWorkbook.Worksheets("Data").ListObjects("DataBase").ListRows.Count
Set myRow = ActiveWorkbook.Worksheets("Data").ListObjects("DataBase").ListRows.Add(intRows)
'Header filling
myRow.Range(1) = Range("C8")
myRow.Range(12) = Range("C7")
myRow.Range(13) = Range("H8")"
"Database" is a Table and Data, as the formatting suggests, a sheet. The number inside "myRow.Range" are the columns I'm adding the values to and the cell reference are cell in a form.
I'm trying to adapt this code to run the function I'm intending, but I'm not finding a way to make it work.
Bookmarks