Forum Discussion
Datalogic scan to Excel
- Jan 03, 2022
=OFFSET(A2,ROW(A2)-1,0,1,1)
=OFFSET(A2,ROW(A2)-2,0,1,1)
Not sure what could go haywire when using the VBA code in the attached file. The data is arranged in alternating order in column A and the code is adapted to these conditions. Maybe you want to use the above formulas. Enter them in cells B2 and C2 and fill down. Then copy the results and paste only values. Finally delete the "0" results in the lower half of columns B and C.
=OFFSET(A2,ROW(A2)-1,0,1,1)
=OFFSET(A2,ROW(A2)-2,0,1,1)
Not sure what could go haywire when using the VBA code in the attached file. The data is arranged in alternating order in column A and the code is adapted to these conditions. Maybe you want to use the above formulas. Enter them in cells B2 and C2 and fill down. Then copy the results and paste only values. Finally delete the "0" results in the lower half of columns B and C.
Would it be possible to limit the data entered into the Staff ID to a max of 4 digits and 13 digits for the Stock No. I have seen a challenge when somebody would scan vice versa and I am forced to re-organize the data before pulling down the formula.
- OliverScheurichJan 05, 2022Gold Contributor
=LEFT(OFFSET(A2,ROW(A2)-1,0,1,1),4)
Do you only want to return "1234" if the Staff ID is "1234567890" ? If so you can try above formula.
=LEFT(OFFSET(A2,ROW(A2)-2,0,1,1),13)
In order to return the first 13 digits of the Stock No. you can try the formula above.
- A_SIRATJan 09, 2022Iron ContributorI worked with Data Validation on the cells and it works as required.
Would you be able to change this formula ..OFFSET(A2,ROW(A2)-1,0,1,1) ..to use INDEX instead of OFFSET...
The workbook becomes slow and it could be because of this volatile function.- OliverScheurichJan 09, 2022Gold Contributor