Macro to search excel

Closed
SE - Jan 31, 2011 at 09:04 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Feb 9, 2011 at 05:21 PM
Hello,

I'm trying to write a macro so when a number is scanned into Excel (using a bar-code scanner) it searches the sheet to check if that number is already there, it if is to highlight the cell the number is in and possibly throw up an error, if not for it to populate the next empty cell in the row and move to the next one.


Thanks

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Feb 9, 2011 at 05:21 PM
since it is not known how scanned value is popped into excel
I am thinking that you can use change event of sheet

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub
0