K
Klemen25
Hello
I have to review large amount of documents with bar codes.
I am using a barcode scanner to input data into a column A, it triggers vlookups in the B column, which informs me if the document is to be kept (withreturning long number) or to be destroyed (with returning text "to be kept").
As it is difficult to constantly look up and down to see the vlookup result, I added in column C function "=right" that would extract the last 3 numbers from the vlookup result, and the macro below that would read these numbers through my earphones. With this I would also be able to double check if the account number found is identical to the one on the paper.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, c As Range, ir As Range
Set r = Range("C1:C1000")
Set ir = Application.Intersect(Target, r)
If ir Is Nothing Then Exit Sub
For Each c In ir
Target.Speak
Next c
End Sub
But as the "right" function in column C is not saved as number the macro does not read the result (for instance number 356).
Could someone suggest how to solve this issue?
I tried to use paste special values before this macro, but reasonably failed.
Thank you all!
All the best
I have to review large amount of documents with bar codes.
I am using a barcode scanner to input data into a column A, it triggers vlookups in the B column, which informs me if the document is to be kept (withreturning long number) or to be destroyed (with returning text "to be kept").
As it is difficult to constantly look up and down to see the vlookup result, I added in column C function "=right" that would extract the last 3 numbers from the vlookup result, and the macro below that would read these numbers through my earphones. With this I would also be able to double check if the account number found is identical to the one on the paper.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, c As Range, ir As Range
Set r = Range("C1:C1000")
Set ir = Application.Intersect(Target, r)
If ir Is Nothing Then Exit Sub
For Each c In ir
Target.Speak
Next c
End Sub
But as the "right" function in column C is not saved as number the macro does not read the result (for instance number 356).
Could someone suggest how to solve this issue?
I tried to use paste special values before this macro, but reasonably failed.
Thank you all!
All the best