Hi,

I am writing a program for an HMI and the HMI currently takes it data from a CSV that is pushed to it using windows task scheduler. I need the user to be able to enter an alphanumeric value into a spreadsheet, then in another sheet I want to convert that data to it's 256bit ASCII equivalent. The data is never more than 6 characters long. The HMI will store only two ASCII characters in one data register, so the data must be split up into three different values. I have attached a .CSV that does this with formulas, however I want to eliminate columns B-G on sheet 1 and just have a custom formula that will turn Column A into Column H using one command. I also want to be able to add a case for the data that's not 6 characters long where it leaves the cell blank rather than 0 as zero will still be converted into it's ASCII equivalent and will require the user to enter their number and then how ever many zeros to get to six characters in order for the data comparison to work. I was thinking the VB script could go off length of the data so it does not calculated the conversion on nothing.
cotvins.csvCOTVINHMI.xlsx
I wanted the function to work such that in A1 you have a data point and in B1 you enter your formula =vin2asc(A1) and it automatically fills B1, B2, B3 as necessary. For 1-2 char long data it would only be B1, 3-4 would be B1+B2, and 5-6 would be B1, B2, B3. and then you could then do the next data point in B4 =vin2asc(A4) and it would fill B4, B5, B6.

Once this is all done I want another file that's a bare CSV to have those calculated values in it. This is shown in the second file where I tried to do a workbook reference and then auto fill and it would not take the pattern.

I realize this is a lot and I'm not sure if this is even possible. I knowledge of VB is not that good and I have attempted to write some scripts before but nothing like this. Any direction would be greatly appreciated.