Decrease the copied hexadecimal value by 1 追蹤

0
Avatar
Paweł Gancarz

Hi,
I have a MAC address encoded in hexadecimal barcode. Its contents are copied to another code with the removal of the colon. In addition, I would like the program to reduce the copied value by 1, also in hexadecimal.
Thank you for your help.

Example

2 意見

0
Avatar
Pete Thane
評論操作 永久連結

Set the Data Type to Number and then choose Hexadecimal as the Locale, such as 

 

Someone was doing something similar (albeit counting upwards) a few months ago where the colons were causing an issue. This was reported as a bug but I am nit sure if it has been fixed yet or if the issue effected decrementing numbers, but if you do notice a problem then this link may help

https://support.seagullscientific.com/hc/en-us/community/posts/360051085674-Hexadecimal-counter

Pete

0
Avatar
Paweł Gancarz
評論操作 永久連結

I close the topic. Problem solved.

In this way:

value = Left(value, 6) & hex(CLng("&h" & Right(value, 6)) - 1)

登入寫評論。