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.
In the attached file when you click on the button in cell F2 the data from column A is split into 2 columns B and C. Is this what you want to do?
The output is what I would like to have but since I am not good with VBA, I am afraid, if things go haywire, then I am stuck.
- OliverScheurichJan 03, 2022Gold Contributor
=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.
- A_SIRATJan 04, 2022Iron ContributorHi,
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 03, 2022Iron ContributorThank you again ! This works for me .