Counting Octals.
Joel,
I couldn't get it to work.
Do I need to tweak it anywhere?
Paul
"Joel" wrote:
Sub fromoctal()
TextNum = Trim(Range("A1").Text)
OctNum = 0
Do While Len(TextNum) 0
OctNum = (8 * OctNum) + Val(Left(TextNum, 1))
TextNum = Mid(TextNum, 2)
Loop
End Sub
"Paul Tikken" wrote:
Mike,
Yes still going strong on octals.
My bad, let me clearify;
The 200 and 377 I spoke about is an allocated range, meaning that the number
200 tru 277 and 300 tru 377 can be used, but only the numbers 0 tru 7 (so
that's why I spoke about octals) if you add these up you'll get 128 (64 for
200 tru 277 and 64 for 300 tru 377)
Any ideas?
Paul
"Mike H" wrote:
Paul,
Still doing Octal I see. I think we need some clarification
200+377 octal=577 octal
200+377 octal = 383 decimal
As you will note, neither are the 128 you want
(128 oct = decimal 200)
DEC2OCT and OCT2DEC are something to look at
Mike
"Paul Tikken" wrote:
Hi,
I'm using a sheet that has Octal values in it, so only 0 tru 7 are used as
numbers.
A value in column F in entered in Octals e.g. 00200, another value is
entered in column G e.g. 00377.
Now I would like the total amount of numbers to show up in Column H, so in
this case 128.
There are a couple of snacks, the following numbers cannot be used and
therefore should not be counted in the total amount; 77 and 176 and 177 and
77777 (77777 is also the last number in the sequence.
Can anybode help?
Paul.
|