Hi i am completely new to VBA i have a couple of codes that work well but i cant make the last one work.
I have a sheet where I have assign a piece of equipment to a name by entering its serial number
On a daily basis I want to be able to scan a barcode of the serial number which will find the cell containing it on my sheet (this i have already working on another code)
I then want it to select the intersect point of the row that the found cell is on and a column which contains the current date.
Sub FindValue()
Dim searchValue As String
Dim Cell As Range
Dim found As Boolean
' Open an input box to request a value
searchValue = InputBox("Enter the value to find:", "Find Value")
' Initialize found flag
found = False
' Search for the value in the active sheet
For Each Cell In ActiveSheet.UsedRange
If Cell.value = searchValue Then
Cell.Select
found = True
myRow = ActiveCell.Row
Exit For
End If
~~~the above works but cant integrate the following code into it~~~~~~~
find Cell.value = Date
Cell.Select
found = True
myColumn = ActiveCell.Column
End If
Intersect(myRow, myColumn).value = x
Next Cell
End Sub
I appologise in advance to the bad code, as i said i am starting to learn.