Hi
@Kiara87 The a$ I used in the example for coloring represented the variable "a" you are pulling from the file = 1 row of numbers.
I didn't have a file line so I made one up to show as example.
For you, after you get "a" from the file, you will have a string of numbers that you are accessing with MID$(a, position, lengthOf2) just as you use these MID$ strings to show numbers, you use them to do calculations with VAL() to transform them into numbers to add subtract and use ABS() function.
To calculate the difference in one part of "a" with another part of "a" you have position = p for first number and position + some number for the other section of "a" or position of first number and position of second number in "a".
You will have to do that for each and every number you want to compare and color red before you print each and every number.
To post code at this forum select all the code in QB64 IDE (editor) Copy it then here at forum Reply press the button with the QB64 icon in this forum editor you will get [ code = qb64 ][ / code ] without spaces in edit window of forum.
paste your code between the two brackets ][ in the middle of the code tag.
st [ code = qb64 ] is before the start of your code and [ / code ] is after the end of your code. You can just type it in that way only without spaces inside the brackets.
Then maybe I can write in comments on your code for easier understanding. :)