Good evening people, I created a folder with macro where I have two spreadsheets, Query and games. In the games spreadsheet I put game names and their respective values in real, already in the query I created a list to do the autocomplete with combo box using procv.
So what am I trying to do, get the value of a cell that gets its value from the combo box and copies it to another cell that while doing this, cell selection goes down, to as soon as I select another game, it will again copy the value from that cell to the new one. I already managed to get the value and throw it in the other cell, but I do not know how to make the selection go to the cell below, I already researched and tried to use the Application.SendKeys "{ENTER}" but it did not work, I I thought about using For each and I managed to make the line jump, but after that I could not find a way to get the value again.Follow the code below.
Sub teste()
Dim exame As String
Dim valor As Double
Dim limite, celula As Range
Set limite = Range("F2:F50")
For Each celula In limite.Offset(0, 5)
If Range("E4").Value <> "" Then
exame = Range("E4").Value
valor = Range("D5").Value
Range("F2").Value = exame
Range("G2").Value = valor
End If
Next
End Sub