Forum Discussion

bwlleonard's avatar
bwlleonard
Copper Contributor
Jul 03, 2024

Macro to move row to another sheet

Hello all,

 

I'm still new to VBA and practicing through trial and error. I'm currently working on an excel document that is an inventory spreadsheet. When we perform annual inventory checks I want to use a barcode scanner to quickly go through and check the inventory.

 

Is there a way to build a macro in VBA that will allow me to scan the barcodes and auto run it against a certain column and if the barcode scanned is present it will then pull that entire row from sheet 1 to and place it into sheet 2? 

 

Thanks in advance for any and all your help!

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor
    You do not need VBA in this case. Use FILTER() function. So, when you scan barcode, the scan data will show in a cell to sheet2. Use FILTER() function to pull data from sheet1 based on criteria of scan data.

Resources