Hello, I am new to basic programming and wasn't sure which thread this should go in.
I have a little program which I need to write which essentially does the below:
I have a data set for example:
103848291
29381
3208019
392791145
They need to be formatted based on a predefined data range. So, for example:
PC0000029381
QQQ103848291
Based on whether the number falls between a certain range, I need it to be prefixed by either PC or QQQ and based on the range, I need to assign a certain number of zero's
So, for example
LOWER RANGE:
QQQ00192284
UPPER RANGE:
QQQ00039947
So based on the dataset (at the top of the tread) I need to say:
29381 falls between this range. So it should have
QQQ and three 0's in front of the number.
I have started trying to code this out; and have managed to use an if statement to clear out unwanted data, but really have no idea where to start on this part of the script.
It seems like I need to remove the first few letters from the ranges (e.g. QQQ and then compare the data?)
Any and all help would be greatly appreciated!
Basic Logic
Page 1 of 11 Replies  489 Views  Last Post: 05 October 2012  02:25 AM
Replies To: Basic Logic
#2
Re: Basic Logic
Posted 05 October 2012  02:25 AM
As added information. The data list is in an Excel file and could be updated frequently.
Page 1 of 1
