is there a way i could create a simple program/code that allows me to have excel automatically create cell gaps between barcode scanned text the information should be presented as:
Sample number 1
Sample number 1
Gap
Gap
Sample number 2
Sample number 2
I use a barcode scanner (datalogics gryphon) to scan blood samples and work and constantly need to press enter in order to manually create gaps between the blood samples i scan. Is there any way i could have this done automatically. The normal gist is usually "scan, enter, scan, enter, enter, enter, scan" I want to remove the need of pressing enter between scanning. I need to scan countless blood samples on a day-to-day basis and this will increase speed by a dramatic amount
A bar code reader sends character to an application in the similar way a keyboard way does.
A simple way would be to print on a blank sheet the bar code for "Enter". The enter command is "CR" and the value in hexadecimal is "0D".
Scanning the "CR" code between each sample doesn't remove a step but avoids going to the keyboard.
Related
PROBLEM:
hey y'all, i have a large dataset of both domestic and international phone numbers formatted in various ways that i need to convert to a particular format based on specific criteria.
example of current phone number formats in the dataset:
###-##-##-####-####
+##-##-####-####
(###) ###-####
+## (#) ## ### ## ##
##-##-######-#
as you can see, the phone number formats vary greatly and there are many more examples that i did not list. i work with datasets averaging 1000+ rows.
what i try varies depending on how much data cleanup i need to perform, but below are some of my current methods.
Approach 1: Manually editing
i have attempted manually updating the phone numbers to my desired formatting. however this is time consuming and leads to user error.
Approach 2: CTRL+1 "Format Cells"
i start by sorting my list of numbers. then follow ctrl+1 > Number > Custom to format the following:
domestic as 000-000-0000, UK as +##-##-####-####, etc.
the issue with this method is that the numbers are stored as formatted "Custom" values. so any special spaces or characters (i.e. "-", "+") do not exist within the string. meaning that i cannot import into my crm.
i have attempted to manually add "'" at the beginning of each formatted phone number, but it removes the special formatting. e.g. ###-###-#### just becomes '##########.
Approach 3: Functions
i have tried using the following functions on domestic phone numbers, but they only work if formatting follows ###-###-####. which is not always the case for the data i work with.
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"(",""),")","")," ",""),"-","")
or
=MID(A1,2,3)&MID(A1,7,3)&RIGHT(A1,4)
Approach 4: Macro
i've attempted recording macros, but this does not work properly since the length/formatting of a cell value and size of a sheet always varies.
Approach 5: VBA script
i am currently exploring various scripts. there are a ton of examples on stackoverflow, but most presume clean data formatted as (###) ###-####. so the scripts do not work for me.
this post was helpful as a first step to removing all special characters from cells: Phone number format
but again, only applies to certain types of formatting.
DESIRED OUTCOME
i undergo this process various times a month and am hoping somebody can help me optimize my approach.
i need domestic numbers to become ###-###-#### and international phone numbers vary, but the UK would look like +##-##-####-####. i need these characters to exist within the actual string of each cell, otherwise my crm will not accept the phone numbers.
I'm not entirely sure, but maybe this gets you going:
Formula in B1:
=MAP(A1:A5,LAMBDA(x,LET(y,CONCAT(TEXTSPLIT(x,TEXTSPLIT(x,ROW(1:10)-1,,1),,1)),TEXT(--y,SWITCH(LEN(y),10,"###-###-####",12,"+##-##-####-####","0")))))
MAP(A1:A5,LAMBDA(x - Loop over a given dataset;
LET(y,CONCAT(TEXTSPLIT(x,TEXTSPLIT(x,ROW(1:10)-1,,1),,1)) - Part where each input gets cleared into just pure numeric characters;
TEXT(--y,SWITCH(LEN(y),10,"###-###-####",12,"+##-##-####-####","0"))))) - Now use SWITCH() to test against the length of the numeric input. If 10 or 12 we kind of know what format we like, the last parameter is the 'standard' format. But obviously you could start adding checks. In the samples given, you'd want to include options for length 11 and 15.
Were moving to using 2d bar codes and 2d bar code scanners. Currently a picker will scan 3 linear bar codes, one for the product, one for the lot number and one for the quantity. The cursor starts in the Product field, after the scan the cursor moves to the lot number field the repeats the process for the quantity. Each scan contains data only for the field intended. Well along comes the 2d bar codes that concatenate all three values into 1 returned string with application identifiers (01,11,10) separating each 'field'. An example of this is (01)12345678901234(11)220728(10)12345. The parentheses are not included in the actual scan, I just showed them for demonstration purposes. My question is how do I know when to parse out each field? For example, in a CSV file, I just look for data in between the commas. I've also read something about FNC1. Can anyone help? Thanks...
2d bar code
Scanner results
All you need is the information on these pages.
This page contains ideas and flowcharts.
GS1 DataMatrix Guideline
You can find a list of application identifiers on this page.
GS1 Application Identifiers
Please use the above in combination to help you implement it.
Problem:
I have a sentence/word I need to past in an excel cell. It consists of an Arabic word, along with some numerical values (in English). For example, let's say I want to write the below
However, excel keeps returning the below
2,1 - الحدث
It you notice, the numerical values are always moved to the left of the word, while I want to keep it on the right.
I tried concatenating, but didn't seem to help. I am open to any solution, vba or not, as I have spent a lot of time on this with no luck.
I added this keyboard to my device and it helped me with that.
Central Kurdish Keyboard
Use it to write the numbers only, and use the normal arabic keyboard to write the rest of the text.
And note that it didn't work with the numpad, it worked only with the numbers row at the top - the one that has the special characters !##$%^&*()
In my job I have to enter warranty information so that POs can be cut. Vendors are very particular with how this is entered and each one has their own format.
One of them requires data be entered:
SN:
MACHTYPE:
Further, the information for this is sent in a single composite number, something like:
10Y754235FUYJ9
Requiring the final input of data to be:
SN:10Y75423
MACHTYPE:UYJ9
The first 4 digits of the composite are the MACHTYPE and the final 8 are the Serial Number.
The impasse I've reached is I can't seem to get auto-fill to replicate the skipping of lines as I've formatted. It will jump a number of lines equal to however many I've selected.
Any ideas about getting it to replicate the first four Formatted Data? I've been throwing myself at this for a couple hours now.
Thanks in advance!
I think you're over complicating it by using two rows for the Formatted Data. I'd wrap the text (Home tab > Alignment section) for the cells in column F and use the following formula to insert a new line:
=CONCATENATE("SN:",B1,CHAR(10),"MATCHTYPE:",C1)
Then just leave the formatting like you had it by row...
Okay, let's focus on the title. When A1 is 10Y754235FUYJ9,
="SN:"&LEFT(A1,8)&CHAR(10)&"MATCHTYPE:"&RIGHT(A1,4)
will give you the output:
SN:10Y75423
MATCHTYPE:UYJ9
And don't forget to set the wrap text checked at Format Cells menu.
I deal with a large number of unique products (10,000+ per year on my own) and I am looking to optimise Excel to make my job more efficient. I have a USB barcode scanner and want to implement this into my process.
My suppliers send me a large spreadsheet with product info, such as barcode number and other product details. I also recieve samples of the product and need to register them within the system, and cross reference them with the spreadsheet.
I am looking for a macro which: when it recieves an input from the scanner, searches and navigates within the spreadsheet to the row where the product is, and if the same barcode has a second scan within 3-5 seconds, fills in the date in column x, and if column x is an occupied cell, fills in the date in column y.
This will allow me to both search for the product without filling in the date (not double scanning) for general lookups, but also to check the product in and out with the date.
Thank you so much in advance for your help!
If it helps, the fact that this question relates to barcode scanning could be disregarded - barcode scanners are implemented simply as keyboard devices that 'type' the number scanned (some append 'enter' on the end, some don't, and some are configurable).
So the answer to your question need not be in any way specific to the scanning of barcodes. It pretty much just needs an InputBox that takes a number and then uses that number in the MATCH function.
e.g.
code = InputBox("Please scan a barcode and hit enter if you need to")
matchedCell = match(code, productRange, 0)
matchedCell.Offset(0,2) = Now
where productRange is the range of cells that your product listing takes up.
edit:
To start with, follow a tutorial like this one: http://www.excel-easy.com/vba/create-a-macro.html
You should end up with a button on your form that, when clicked, will put the word "hello" in cell A1.
Once you have this working, replace the 'hello' code with the lines I suggested above and you should be well on your way.