Thread: [Excel] Finding all hex values between 2 ranges.

1. [Excel] Finding all hex values between 2 ranges.

Hi All

I am looking for a bit of help I am a VB virgin so please bear with me.

How do I create a script in Excel to find all the values between 2 different Hex ranges.

For example I have 6203DC8 and 6203DE1 I know there are 25 values between these ranges.

What I would like is a marco which would list them all I will be looking to do about 1000 at a time hex value will always be different.

Example.

6203DC8
6203DC9
6203DCA
6203DCB
6203DCC
6203DCD
6203DCE
6203DCF
6203DD0
6203DD1
6203DD2
6203DD3
6203DD4
6203DD5
6203DD6
6203DD7
6203DD8
6203DD9
6203DDA
6203DDB
6203DDC
6203DDD
6203DDE
6203DDF
6203DE0

Any help would be great.

Regards
Derek

2. Re: [Excel] Finding all hex values between 2 ranges.

Welcome to teh Forums.

So if you just want to do a math calculation on a 2 hex numbers?

Cell formula:
Code:
`=ABS(SUM(HEX2DEC(A1))-HEX2DEC(A25))`
In a cell to give you a total where A1 and A25 contain the first and last sequential hex numbers to calculate

3. Re: [Excel] Finding all hex values between 2 ranges.

if you just want to list the numbers, try like
Code:
```For i = &H6203DC8 To &H6203DE0
Debug.Print Hex(i)
Next```
change the debug.print to whatever output you want
you can use textbox or cell value instead of hardcoding the start and finish values

4. Re: [Excel] Finding all hex values between 2 ranges.

Ah missed the list them all part of the question. I thought it was how to calculate the numbers between two hex numbers

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Featured

Click Here to Expand Forum to Full Width

×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.