by Sisyphus » Wed Feb 08, 2012 1:01 am
Hello prasan,
You can't do what you aim to do with a formula because a formula can't write to another cell. It can only show in the cell it occupies whatever is, at that time, in another cell.
However, the code I posted in the other thread this morning already does very nearly what you want. I wonder if you have the capability to adapt it. In doing so you need to decide on the procedure:
1. Scan
2. Write weight
or
1. Write weight
2. Scan
If you choose the first way I would suggest that the code should select the cell where the weight is to be entered (in the same row as the number was found in column A). After entering the weight the code can take you back to the cell where the barcode is entered. However, if you enter the barcode by trigger of the barcode reader you don't need to go there at all except if the number isn't in the list. You could go straight to the next weight cell.
Entering the weight in D3 makes sense if you enter it BEFORE the barcode. Bear in mind that you need a trigger to start the action. The trigger could be entering the barcode number or the weight. Since entering the barcode number already triggers the search action it could transport the weight to its destination at the same time. That would require less code to be written.
Have a great day!
Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)