Finding result from multiples of 65536 Hi I have a list of numbers being generated from a computer as an ID.  This list is as follows:-
2742,
68278,
199350,
330422,
461494,
592566,
658102,
Each of these values is derived from taking a general ID and then adding multiples of 65536 (2^16) depending on which step of the general group you are in.  The thing is that i need to find an equation which will take any of these values without knowing anything of the others in the series and give me back both the general id and the step number.
ie 
2742 = general id = 2742 step 0;
68278 = general id = 2742 step 1;
199350 = general id = 2742 step 2;
330422 = general id = 2742 step 3;
461494 = general id = 2742 step 4;   
and so on
I have found a way to get the general id in excel through using mod(ID,65536) but can't for the life of me figure out the step id without knowing something of the rest of the series.
I am going to put this into a piece of VB6 computer code if there is some easy way of expressing this.
 A: If $s$ is the step ID, $g$ the general ID, and $n$ the ID number generated from the general ID and step, then you have the formula
$$ n = 65536 s + g.\tag1$$
You have already found that for any generated ID $n,$ 
the general ID is
$g = \mathrm{MOD}(n, 65536)$
where MOD is the Excel MOD function.
You can derive an equation with just $s$ on one side from Equation $(1)$
by subtracting $g$ from each side and then dividing:
$$
s = \frac{n - g}{65536}.\tag2
$$
So if you are given $n,$ you can use the MOD function to find $g$
and then apply $(2)$ to find the step number $s.$
Another possibility is to observe what happens when you divide both sides of
Equation $(1)$ by $65536$:
$$
\frac{n}{65536} = s + \frac{g}{65536}.\tag3
$$
Assuming the general ID $g$ is never negative and never greater
than $65535,$
the right-hand side of $(3)$ is a common fraction,
consisting of an integer part ($s$) and a fractional part
($g/63356$).
So the integer part of the left-hand side is also $s.$
You can use the "floor" function to get this number
from $n/65536.$
